Syntax structures for high dynamic range and wide color gamut video coding

ABSTRACT

This disclosure relates to processing video data, including processing video data that is represented by an HDR/WCG color representation. In accordance with one or more aspects of the present disclosure, one or more syntax structures may be used to signal syntax elements and or other information that allow a video decoder or video postprocessing device to reverse the dynamic range adjustment (DRA) techniques of this disclosure to reconstruct the original or native color representation of the video data. Dynamic range adjustment (DRA) parameters may be applied to video data in accordance with one or more aspects of this disclosure in order to make better use of an HDR/WCG color representation, and may include the use of global offset values, as well as local scale and offset values for partitions of color component values.

This application is a continuation application of and claims priority toU.S. application Ser. No. 15/269,497, filed Sep. 19, 2016, which claimsthe benefit of U.S. Provisional Application No. 62/221,586, filed Sep.21, 2015, and U.S. Provisional Application No. 62/236,804, filed Oct. 2,2015. The entire content of all of these applications is herebyincorporated by reference.

TECHNICAL FIELD

This disclosure relates to video processing.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocoding techniques, such as those described in the standards defined byMPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, Advanced VideoCoding (AVC), ITU-T H.265, High Efficiency Video Coding (HEVC), andextensions of such standards. The video devices may transmit, receive,encode, decode, and/or store digital video information more efficientlyby implementing such video coding techniques.

Video coding techniques include spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (e.g., a video frame or a portion of a video frame) may bepartitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra-coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter-coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures. Pictures may be referredto as frames, and reference pictures may be referred to as referenceframes.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter-codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra-coded block is encoded according to an intra-coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized. Thequantized transform coefficients, initially arranged in atwo-dimensional array, may be scanned in order to produce aone-dimensional vector of transform coefficients, and entropy coding maybe applied to achieve even more compression.

The total number of color values that may be captured, coded, anddisplayed may be defined by a color gamut. A color gamut refers to therange of colors that a device can capture (e.g., a camera) or reproduce(e.g., a display). Often, color gamuts differ from device to device. Forvideo coding, a predefined color gamut for video data may be used suchthat each device in the video coding process may be configured toprocess pixel values in the same color gamut. Some color gamuts aredefined with a larger range of colors than color gamuts that have beentraditionally used for video coding. Such color gamuts with a largerrange of colors may be referred to as a wide color gamut (WCG).

Another aspect of video data is dynamic range. Dynamic range istypically defined as the ratio between the maximum and minimumbrightness (e.g., luminance) of a video signal. The dynamic range ofcommon video data used in the past is considered to have a standarddynamic range (SDR). Other example specifications for video data definecolor data that has a larger ratio between the maximum and minimumbrightness. Such video data may be described as having a high dynamicrange (HDR).

SUMMARY

This disclosure relates to processing video data, including processingvideo data that is represented by an HDR/WCG color representation. Inaccordance with one or more aspects of the present disclosure, one ormore syntax structures may be used to signal syntax elements and orother information that allow a video decoder or video postprocessingdevice to reverse the dynamic range adjustment (DRA) techniques of thisdisclosure to reconstruct the original or native color representation ofthe video data. Dynamic range adjustment (DRA) parameters may be appliedto video data in accordance with one or more aspects of this disclosurein order to make better use of an HDR/WCG color representation, and mayinclude the use of global offset values, as well as local scale andoffset values for partitions of color component values.

In one example of the disclosure, a method of decoding video data thathas been adjusted by performing a dynamic range adjustment comprises:receiving at least one syntax structure from an encoded video bitstream,the at least one syntax structure indicating adjustment informationspecifying how the dynamic range adjustment has been applied to thevideo data, and wherein the adjustment information includes: a tonemapping adjustment value that indicates color values can be trimmed to amaximum or a minimum value, and a number of partitions into which thevideo data was partitioned during the dynamic range adjustment; andperforming an inverse dynamic range adjustment on the video data inaccordance with the adjustment information to generate unadjustedcomponent values from the video data, wherein performing the inversedynamic range adjustment includes generating the unadjusted componentvalues according to the number of partitions.

In another example of the disclosure, a method of encoding video datacomprises: performing a dynamic range adjustment on the video data togenerate adjusted component values from the video data; and generatingat least one syntax structure in an encoded video bitstream, the atleast one syntax structure indicating adjustment information specifyinghow the dynamic range adjustment has been applied to the video data,wherein the adjustment information includes: a tone mapping adjustmentvalue that indicates color values can be trimmed to a maximum or aminimum value, and a number of partitions into which the video data waspartitioned during the dynamic range adjustment, and wherein performingthe dynamic range adjustment includes generating the adjusted componentvalues according to the number of partitions.

In another example of the disclosure, an apparatus configured to decodevideo data that has been adjusted by performing a dynamic rangeadjustment comprises a memory configured to store the video data; andone or more processors configured to: receive at least one syntaxstructure in an encoded video bitstream, the at least one syntaxstructure indicating adjustment information specifying how the dynamicrange adjustment has been applied to the video data, and wherein theadjustment information includes: a tone mapping adjustment value thatindicates color values can be trimmed to a maximum or a minimum value,and a number of partitions into which the video data was partitionedduring the dynamic range adjustment; and perform an inverse dynamicrange adjustment on the video data in accordance with the adjustmentinformation to generate unadjusted component values from the video data,wherein performing the inverse dynamic range adjustment includesgenerating the unadjusted component values according to the number ofpartitions.

In another example of the disclosure, an apparatus configured to encodevideo comprises: a memory configured to store the video data; and one ormore processors configured to: perform a dynamic range adjustment on thevideo data to generate adjusted component values from the video data,and generate at least one syntax structure in an encoded videobitstream, the at least one syntax structure indicating adjustmentinformation specifying how the dynamic range adjustment has been appliedto the video data, wherein the adjustment information includes: a tonemapping adjustment value that indicates color values can be trimmed to amaximum or a minimum value, and a number of partitions into which thevideo data was partitioned during the dynamic range adjustment, andwherein performing the dynamic range adjustment includes generating theadjusted component values according to the number of partitions.

In another example of the disclosure, an apparatus configured to decodevideo data that has been adjusted by performing a dynamic rangeadjustment comprises means for receiving at least one syntax structurein an encoded video bitstream, the at least one syntax structureindicating adjustment information specifying how the dynamic rangeadjustment has been applied to the video data, and wherein theadjustment information includes: a tone mapping adjustment value thatindicates color values can be trimmed to a maximum or a minimum value,and a number of partitions into which the video data was partitionedduring the dynamic range adjustment; and means for performing an inversedynamic range adjustment on the video data in accordance with theadjustment information to generate unadjusted component values from thevideo data, wherein performing the inverse dynamic range adjustmentincludes generating the unadjusted component values according to thenumber of partitions.

In another example of the disclosure, a computer program product fordecoding video data that has been adjusted by performing a dynamic rangeadjustment has instructions stored thereon. When executed, theinstructions cause a processor to: receive at least one syntax structurein an encoded video bitstream, the at least one syntax structureindicating adjustment information specifying how the dynamic rangeadjustment has been applied to the video data, and wherein theadjustment information includes: a tone mapping adjustment value thatindicates color values can be trimmed to a maximum or a minimum value,and a number of partitions into which the video data was partitionedduring the dynamic range adjustment; and perform an inverse dynamicrange adjustment on the video data in accordance with the adjustmentinformation to generate unadjusted component values from the video data,wherein performing the inverse dynamic range adjustment includesgenerating the unadjusted component values according to the number ofpartitions.

The details of one or more examples are set forth in the accompanyingdrawings and the description below. Other features, objects, andadvantages will be apparent from the description, drawings, and claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system configured to implement the techniques of thedisclosure.

FIG. 2 is a conceptual drawing illustrating the concepts of HDR data.

FIG. 3 is a conceptual diagram illustrating example color gamuts.

FIG. 4 is a conceptual diagram illustrating an example of HDR/WCGrepresentation conversion.

FIG. 5 is a conceptual diagram illustrating an example of HDR/WCGrepresentation inverse conversion.

FIG. 6 is conceptual diagram illustrating example of Electro-opticaltransfer functions (EOTF) utilized for video data conversion (includingSDR and HDR) from perceptually uniform code levels to linear luminance.

FIG. 7 is a conceptual diagram illustrating aspects of a color gamutconversion process as applied to a single color component.

FIG. 8 is a block diagram illustrating an example HDR/WCG conversionapparatus operating according to the techniques of this disclosure.

FIGS. 9A through 9C are conceptual diagrams illustrating aspects of adynamic range adjustment process in accordance with one or more aspectsof the present disclosure.

FIG. 10 is a block diagram illustrating an example HDR/WCG inverseconversion apparatus according to the techniques of this disclosure.

FIG. 11 is a conceptual drawing showing a typical structure of a colorremapping information (CRI) process.

FIG. 12 is a block diagram illustrating an example of a video encoderthat may implement techniques of this disclosure or may be used inaccordance with one or more aspects of the present disclosure.

FIG. 13 is a block diagram illustrating an example of a video decoderthat may implement techniques of this disclosure or may be used inaccordance with one or more aspects of the present disclosure.

FIG. 14 is a flowchart illustrating an example HDR/WCG conversionprocess according to the techniques of this disclosure.

FIG. 15 is a flowchart illustrating an example HDR/WCG inverseconversion process according to the techniques of this disclosure.

DETAILED DESCRIPTION

This disclosure is related to the processing and/or coding of video datawith high dynamic range (HDR) and wide color gamut (WCG)representations. More specifically, the techniques of this disclosureinclude signaling and related operations that are applied to video datain certain color spaces to enable more efficient compression of HDR andWCG video data. In accordance with one or more aspects of the presentdisclosure, parameters relating to such operations may be signaledthrough one or more SEI messages. The techniques and devices describedherein may improve compression efficiency of hybrid-based video codingsystems (e.g., H.265/HEVC, H.264/AVC, etc.) utilized for coding videodata, including HDR and WCG video data.

Video coding standards, including hybrid-based video coding standardsinclude ITU-T H.261, ISO/IEC MPEG-1 Visual, ITU-T H.262 or ISO/IECMPEG-2 ITU-T H.263, ISO/IEC MPEG-4 Visual and ITU-T H.264 (also known asISO/IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) andMulti-view Video Coding (MVC) extensions. The design of a new videocoding standard, namely High Efficiency Video coding (HEVC, also calledH.265), has been finalized by the Joint Collaboration Team on VideoCoding (JCT-VC) of ITU-T Video Coding Experts Group (VCEG) and ISO/IECMotion Picture Experts Group (MPEG). An HEVC draft specificationreferred to as HEVC Working Draft 10 (WD10), Bross et al., “Highefficiency video coding (HEVC) text specification draft 10 (for FDIS &Last Call),” Joint Collaborative Team on Video Coding (JCT-VC) of ITU-TSG16 WP3 and ISO/IEC JTC1/SC29/WG11, 12th Meeting: Geneva, CH, 14-23Jan. 2013, JCTVC-L1003v34, is available fromhttp://phenix.int-evry.fr/jct/doc_end_user/documents/12_Geneva/wg11/JCTVC-L1003-v34.zip.The finalized HEVC standard is referred to as HEVC version 1.

A defect report, Wang et al., “High efficiency video coding (HEVC)Defect Report,” Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, 14th Meeting: Vienna, AT, 25Jul.-2 Aug. 2013, JCTVC-N1003v1, is available fromhttp://phenix.int-evry.fr/jct/doc_end_user/documents/14_Vienna/wg11/JCTVC-N1003-v1.zip.The finalized HEVC standard document is published as ITU-T H.265, SeriesH: Audiovisual and Multimedia Systems, Infrastructure of audiovisualservices—Coding of moving video, High efficiency video coding,Telecommunication Standardization Sector of InternationalTelecommunication Union (ITU), April 2013, and another version of thefinalized HEVC standard was published in October 2014. A copy of theH.265/HEVC specification text may be downloaded fromhttp://www.itu.int/rec/T-REC-H.265-201504-I/en.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may utilize techniques of this disclosure. Asshown in FIG. 1, system 10 includes a source device 12 that providesencoded video data to be decoded at a later time by a destination device14. In particular, source device 12 provides the video data todestination device 14 via a computer-readable medium 16. Source device12 and destination device 14 may comprise any of a wide range ofdevices, including desktop computers, notebook (i.e., laptop) computers,tablet computers, set-top boxes, telephone handsets such as so-called“smart” phones, so-called “smart” pads, televisions, cameras, displaydevices, digital media players, video gaming consoles, video streamingdevices, or the like. In some cases, source device 12 and destinationdevice 14 may be equipped for wireless communication.

Destination device 14 may receive the encoded video data to be decodedvia computer-readable medium 16. Computer-readable medium 16 maycomprise any type of medium or device capable of moving the encodedvideo data from source device 12 to destination device 14. In oneexample, computer-readable medium 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wired orwireless communication protocol, and transmitted to destination device14. The communication medium may comprise any wireless or wiredcommunication medium, such as a radio frequency (RF) spectrum or one ormore physical transmission lines. The communication medium may form partof a packet-based network, such as a local area network, a wide-areanetwork, or a global network such as the Internet. The communicationmedium may include routers, switches, base stations, or any otherequipment that may be useful to facilitate communication from sourcedevice 12 to destination device 14.

In other examples, computer-readable medium 16 may includenon-transitory storage media, such as a hard disk, flash drive, compactdisc, digital video disc, Blu-ray disc, or other computer-readablemedia. In some examples, a network server (not shown) may receiveencoded video data from source device 12 and provide the encoded videodata to destination device 14, e.g., via network transmission.Similarly, a computing device of a medium production facility, such as adisc stamping facility, may receive encoded video data from sourcedevice 12 and produce a disc containing the encoded video data.Therefore, computer-readable medium 16 may be understood to include oneor more computer-readable media of various forms, in various examples.

In some examples, encoded data may be output from output interface 22 toa storage device. Similarly, encoded data may be accessed from thestorage device by input interface. The storage device may include any ofa variety of distributed or locally accessed data storage media such asa hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile ornon-volatile memory, or any other suitable digital storage media forstoring encoded video data. In a further example, the storage device maycorrespond to a file server or another intermediate storage device thatmay store the encoded video generated by source device 12. Destinationdevice 14 may access stored video data from the storage device viastreaming or download. The file server may be any type of server capableof storing encoded video data and transmitting encoded video data to thedestination device 14. Example file servers include a web server (e.g.,for a website), an FTP server, network attached storage (NAS) devices,or a local disk drive. Destination device 14 may access the encodedvideo data through any standard data connection, including an Internetconnection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., DSL, cable modem, etc.), or acombination of both that is suitable for accessing encoded video datastored on a file server. The transmission of encoded video data from thestorage device may be a streaming transmission, a download transmission,or a combination thereof.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, Internet streamingvideo transmissions, such as dynamic adaptive streaming over HTTP(DASH), digital video that is encoded onto a data storage medium,decoding of digital video stored on a data storage medium, or otherapplications. In some examples, system 10 may be configured to supportone-way or two-way video transmission to support applications such asvideo streaming, video playback, video broadcasting, and/or videotelephony.

In the example of FIG. 1, source device 12 includes video source 18,video preprocessor 19, video encoder 20, and output interface 22.Destination device 14 includes input interface 28, video postprocessor31, video decoder 30, and display device 32. In accordance with thisdisclosure, video preprocessor 19 of source device 12 may be configuredto implement the techniques of this disclosure, including signaling andrelated operations applied to video data in certain color spaces toenable more efficient compression of HDR and WCG video data. In someexamples, video preprocessor 19 may be separate from video encoder 20.In other examples, video preprocessor 19 may be part of video encoder20. In other examples, a source device and a destination device mayinclude other components or arrangements. For example, source device 12may receive video data from an external video source 18, such as anexternal camera. Likewise, destination device 14 may interface with anexternal display device, rather than including an integrated displaydevice.

The illustrated system 10 of FIG. 1 is merely one example. Techniquesfor processing HDR and WCG video data may be performed by any digitalvideo encoding and/or video decoding device. Moreover, the techniques ofthis disclosure may also be performed by a video preprocessor and/orvideo postprocessor. A video preprocessor may be any device configuredto process video data before encoding (e.g., before HEVC encoding). Avideo postprocessor may be any device configured to process video dataafter decoding (e.g., after HEVC decoding). Source device 12 anddestination device 14 are merely examples of such coding devices inwhich source device 12 generates coded video data for transmission todestination device 14. In some examples, devices 12, 14 may operate in asubstantially symmetrical manner such that each of devices 12, 14include video encoding and decoding components, as well as a videopreprocessor and a video postprocessor (e.g., video preprocessor 19 andvideo postprocessor 31, respectively). Hence, system 10 may supportone-way or two-way video transmission between video devices 12, 14,e.g., for video streaming, video playback, video broadcasting, or videotelephony.

Video source 18 of source device 12 may include a video capture device,such as a video camera, a video archive containing previously capturedvideo, and/or a video feed interface to receive video from a videocontent provider. As a further alternative, video source 18 may generatecomputer graphics-based data as the source video, or a combination oflive video, archived video, and computer-generated video. In some cases,if video source 18 is a video camera, source device 12 and destinationdevice 14 may form so-called camera phones or video phones. As mentionedabove, however, the techniques described in this disclosure may beapplicable to video coding and video processing, in general, and may beapplied to wireless and/or wired applications. In each case, thecaptured, pre-captured, or computer-generated video may be encoded byvideo encoder 20. The encoded video information may then be output byoutput interface 22 onto a computer-readable medium 16.

Input interface 28 of destination device 14 receives information fromcomputer-readable medium 16. The information of computer-readable medium16 may include syntax information defined by video encoder 20, which isalso used by video decoder 30, that includes syntax elements thatdescribe characteristics and/or processing of blocks and other codedunits, e.g., groups of pictures (GOPs). Display device 32 displays thedecoded video data to a user, and may comprise any of a variety ofdisplay devices such as a cathode ray tube (CRT), a liquid crystaldisplay (LCD), a plasma display, an organic light emitting diode (OLED)display, or another type of display device.

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder circuitry, such as one or moremicroprocessors, digital signal processors (DSPs), application specificintegrated circuits (ASICs), field programmable gate arrays (FPGAs),discrete logic, software, hardware, firmware or any combinationsthereof. When the techniques are implemented partially in software, adevice may store instructions for the software in a suitable,non-transitory computer-readable medium and execute the instructions inhardware using one or more processors to perform the techniques of thisdisclosure. Each of video encoder 20 and video decoder 30 may beincluded in one or more encoders or decoders, either of which may beintegrated as part of a combined encoder/decoder (CODEC) in a respectivedevice.

Video preprocessor 19 and video postprocessor 31 each may be implementedas any of a variety of suitable encoder circuitry, such as one or moremicroprocessors, DSPs, ASICs, FPGAs, discrete logic, software, hardware,firmware or any combinations thereof. When the techniques areimplemented partially in software, a device may store instructions forthe software in a suitable, non-transitory computer-readable medium andexecute the instructions in hardware using one or more processors toperform the techniques of this disclosure.

In some examples, video encoder 20 and video decoder 30 operateaccording to a video compression standard, such as ISO/IEC MPEG-4 Visualand ITU-T H.264 (also known as ISO/IEC MPEG-4 AVC), including itsScalable Video Coding (SVC) extension, Multi-view Video Coding (MVC)extension, and MVC-based three-dimensional video (3DV) extension. Insome instances, any bitstream conforming to MVC-based 3DV alwayscontains a sub-bitstream that is compliant to a MVC profile, e.g.,stereo high profile. Furthermore, there is an ongoing effort to generatea 3DV coding extension to H.264/AVC, namely AVC-based 3DV. Otherexamples of video coding standards include ITU-T H.261, ISO/IEC MPEG-1Visual, ITU-T H.262 or ISO/IEC MPEG-2 Visual, ITU-T H.263, ISO/IECMPEG-4 Visual, and ITU-T H.264, ISO/IEC Visual. In other examples, videoencoder 20 and video decoder 30 may be configured to operate accordingto the HEVC standard.

In accordance with one or more aspects of the present disclosure, one ormore SEI messages may signal one or more parameters generated by videopreprocessor 19. As will be explained in more detail below, videopreprocessor 19 and video postprocessor 31 may be, in some examples,configured to receive video data related to a first color representationcomprising a first color container, the first color container beingdefined by a first color gamut or a first set or color primaries, and afirst color space, derive one or more dynamic range adjustmentparameters, the dynamic range adjustment parameters being based oncharacteristics of the video data, and perform a dynamic rangeadjustment on the video data in accordance with the one or more dynamicrange adjustment parameters. Video encoder 20 may signal the one or moreSEI messages based on one or more parameters received from the videopreprocessor 19. Video decoder 30 may receive and decode the one or moreSEI messages and pass the parameters to the video postprocessor 31.

Video preprocessor 19 and video postprocessor 31 each may be implementedas any of a variety of suitable encoder circuitry, such as one or moremicroprocessors, digital signal processors (DSPs), application specificintegrated circuits (ASICs), field programmable gate arrays (FPGAs),discrete logic, software, hardware, firmware or any combinationsthereof. When the techniques are implemented partially in software, adevice may store instructions for the software in a suitable,non-transitory computer-readable medium and execute the instructions inhardware using one or more processors to perform the techniques of thisdisclosure. As discussed above video preprocessor 19 and videopostprocessor 31 may be separate devices from video encoder 20 and videodecoder 30, respectively. In other examples, video preprocessor 19 maybe integrated with video encoder 20 in a single device and videopostprocessor 31 may be integrated with video decoder 30 in a singledevice.

In HEVC and other video coding standards, a video sequence typicallyincludes a series of pictures. Pictures may also be referred to as“frames.” A picture may include three sample arrays, denoted S_(L),S_(Cb), and S_(Cr). S_(L) is a two-dimensional array (i.e., a block) ofluma samples. S_(Cb) is a two-dimensional array of Cb chrominancesamples. S_(Cr) is a two-dimensional array of Cr chrominance samples.Chrominance samples may also be referred to herein as “chroma” samples.In other instances, a picture may be monochrome and may only include anarray of luma samples.

Video encoder 20 may generate a set of coding tree units (CTUs). Each ofthe CTUs may comprise a coding tree block of luma samples, twocorresponding coding tree blocks of chroma samples, and syntaxstructures used to code the samples of the coding tree blocks. In amonochrome picture or a picture that has three separate color planes, aCTU may comprise a single coding tree block and syntax structures usedto code the samples of the coding tree block. A coding tree block may bean N×N block of samples. A CTU may also be referred to as a “tree block”or a “largest coding unit” (LCU). The CTUs of HEVC may be broadlyanalogous to the macroblocks of other video coding standards, such asH.264/AVC. However, a CTU is not necessarily limited to a particularsize and may include one or more coding units (CUs). A slice may includean integer number of CTUs ordered consecutively in the raster scan.

This disclosure may use the term “video unit” or “video block” to referto one or more blocks of samples and syntax structures used to codesamples of the one or more blocks of samples. Example types of videounits may include CTUs, CUs, PUs, transform units (TUs) in HEVC, ormacroblocks, macroblock partitions, and so on in other video codingstandards.

To generate a coded CTU, video encoder 20 may recursively performquad-tree partitioning on the coding tree blocks of a CTU to divide thecoding tree blocks into coding blocks, hence the name “coding treeunits.” A coding block is an N×N block of samples. A CU may comprise acoding block of luma samples and two corresponding coding blocks ofchroma samples of a picture that has a luma sample array, a Cb samplearray and a Cr sample array, and syntax structures used to code thesamples of the coding blocks. In a monochrome picture or a picture thathas three separate color planes, a CU may comprise a single coding blockand syntax structures used to code the samples of the coding block.

Video encoder 20 may partition a coding block of a CU into one or moreprediction blocks. A prediction block may be a rectangular (i.e., squareor non-square) block of samples on which the same prediction is applied.A prediction unit (PU) of a CU may comprise a prediction block of lumasamples, two corresponding prediction blocks of chroma samples of apicture, and syntax structures used to predict the prediction blocksamples. In a monochrome picture or a picture that have three separatecolor planes, a PU may comprise a single prediction block and syntaxstructures used to predict the prediction block samples. Video encoder20 may generate predictive luma, Cb and Cr blocks for luma, Cb and Crprediction blocks of each PU of the CU.

Video encoder 20 may use intra prediction or inter prediction togenerate the predictive blocks for a PU. If video encoder 20 uses intraprediction to generate the predictive blocks of a PU, video encoder 20may generate the predictive blocks of the PU based on decoded samples ofthe picture associated with the PU.

If video encoder 20 uses inter prediction to generate the predictiveblocks of a PU, video encoder 20 may generate the predictive blocks ofthe PU based on decoded samples of one or more pictures other than thepicture associated with the PU. Inter prediction may be uni-directionalinter prediction (i.e., uni-prediction) or bi-directional interprediction (i.e., bi-prediction). To perform uni-prediction orbi-prediction, video encoder 20 may generate a first reference picturelist (RefPicList0) and a second reference picture list (RefPicList1) fora current slice.

Each of the reference picture lists may include one or more referencepictures. When using uni-prediction, video encoder 20 may search thereference pictures in either or both RefPicList0 and RefPicList1 todetermine a reference location within a reference picture. Furthermore,when using uni-prediction, video encoder 20 may generate, based at leastin part on samples corresponding to the reference location, thepredictive sample blocks for the PU. Moreover, when usinguni-prediction, video encoder 20 may generate a single motion vectorthat indicates a spatial displacement between a prediction block of thePU and the reference location. To indicate the spatial displacementbetween a prediction block of the PU and the reference location, amotion vector may include a horizontal component specifying a horizontaldisplacement between the prediction block of the PU and the referencelocation and may include a vertical component specifying a verticaldisplacement between the prediction block of the PU and the referencelocation.

When using bi-prediction to encode a PU, video encoder 20 may determinea first reference location in a reference picture in RefPicList0 and asecond reference location in a reference picture in RefPicList1. Videoencoder 20 may then generate, based at least in part on samplescorresponding to the first and second reference locations, thepredictive blocks for the PU. Moreover, when using bi-prediction toencode the PU, video encoder 20 may generate a first motion indicating aspatial displacement between a sample block of the PU and the firstreference location and a second motion indicating a spatial displacementbetween the prediction block of the PU and the second referencelocation.

After video encoder 20 generates predictive luma, Cb, and Cr blocks forone or more PUs of a CU, video encoder 20 may generate a luma residualblock for the CU. Each sample in the CU's luma residual block indicatesa difference between a luma sample in one of the CU's predictive lumablocks and a corresponding sample in the CU's original luma codingblock. In addition, video encoder 20 may generate a Cb residual blockfor the CU. Each sample in the CU's Cb residual block may indicate adifference between a Cb sample in one of the CU's predictive Cb blocksand a corresponding sample in the CU's original Cb coding block. Videoencoder 20 may also generate a Cr residual block for the CU. Each samplein the CU's Cr residual block may indicate a difference between a Crsample in one of the CU's predictive Cr blocks and a correspondingsample in the CU's original Cr coding block.

Furthermore, video encoder 20 may use quad-tree partitioning todecompose the luma, Cb and, Cr residual blocks of a CU into one or moreluma, Cb, and Cr transform blocks. A transform block may be arectangular block of samples on which the same transform is applied. Atransform unit (TU) of a CU may comprise a transform block of lumasamples, two corresponding transform blocks of chroma samples, andsyntax structures used to transform the transform block samples. In amonochrome picture or a picture that has three separate color planes, aTU may comprise a single transform block and syntax structures used totransform the transform block samples. Thus, each TU of a CU may beassociated with a luma transform block, a Cb transform block, and a Crtransform block. The luma transform block associated with the TU may bea sub-block of the CU's luma residual block. The Cb transform block maybe a sub-block of the CU's Cb residual block. The Cr transform block maybe a sub-block of the CU's Cr residual block.

Video encoder 20 may apply one or more transforms to a luma transformblock of a TU to generate a luma coefficient block for the TU. Acoefficient block may be a two-dimensional array of transformcoefficients. A transform coefficient may be a scalar quantity. Videoencoder 20 may apply one or more transforms to a Cb transform block of aTU to generate a Cb coefficient block for the TU. Video encoder 20 mayapply one or more transforms to a Cr transform block of a TU to generatea Cr coefficient block for the TU.

After generating a coefficient block (e.g., a luma coefficient block, aCb coefficient block or a Cr coefficient block), video encoder 20 mayquantize the coefficient block. Quantization generally refers to aprocess in which transform coefficients are quantized to possibly reducethe amount of data used to represent the transform coefficients,providing further compression. Furthermore, video encoder 20 may inversequantize transform coefficients and apply an inverse transform to thetransform coefficients in order to reconstruct transform blocks of TUsof CUs of a picture. Video encoder 20 may use the reconstructedtransform blocks of TUs of a CU and the predictive blocks of PUs of theCU to reconstruct coding blocks of the CU. By reconstructing the codingblocks of each CU of a picture, video encoder 20 may reconstruct thepicture. Video encoder 20 may store reconstructed pictures in a decodedpicture buffer (DPB). Video encoder 20 may use reconstructed pictures inthe DPB for inter prediction and intra prediction.

After video encoder 20 quantizes a coefficient block, video encoder 20may entropy encode syntax elements that indicate the quantized transformcoefficients. For example, video encoder 20 may perform Context-AdaptiveBinary Arithmetic Coding (CABAC) on the syntax elements indicating thequantized transform coefficients. Video encoder 20 may output theentropy-encoded syntax elements in a bitstream.

Video encoder 20 may output a bitstream that includes a sequence of bitsthat forms a representation of coded pictures and associated data. Thebitstream may comprise a sequence of network abstraction layer (NAL)units. Each of the NAL units includes a NAL unit header and encapsulatesa raw byte sequence payload (RBSP). The NAL unit header may include asyntax element that indicates a NAL unit type code. The NAL unit typecode specified by the NAL unit header of a NAL unit indicates the typeof the NAL unit. A RBSP may be a syntax structure containing an integernumber of bytes that is encapsulated within a NAL unit. In someinstances, an RBSP includes zero bits.

Different types of NAL units may encapsulate different types of RBSPs.For example, a first type of NAL unit may encapsulate a RBSP for apicture parameter set (PPS), a second type of NAL unit may encapsulate aRBSP for a coded slice, a third type of NAL unit may encapsulate a RBSPfor Supplemental Enhancement Information (SEI), and so on. A PPS is asyntax structure that may contain syntax elements that apply to zero ormore entire coded pictures. NAL units that encapsulate RBSPs for videocoding data (as opposed to RBSPs for parameter sets and SEI messages)may be referred to as video coding layer (VCL) NAL units. A NAL unitthat encapsulates a coded slice may be referred to herein as a codedslice NAL unit. A RBSP for a coded slice may include a slice header andslice data.

Video decoder 30 may receive a bitstream. In addition, video decoder 30may parse the bitstream to decode syntax elements from the bitstream.Video decoder 30 may reconstruct the pictures of the video data based atleast in part on the syntax elements decoded from the bitstream. Theprocess to reconstruct the video data may be generally reciprocal to theprocess performed by video encoder 20. For instance, video decoder 30may use motion vectors of PUs to determine predictive blocks for the PUsof a current CU. Video decoder 30 may use a motion vector or motionvectors of PUs to generate predictive blocks for the PUs.

In addition, video decoder 30 may inverse quantize coefficient blocksassociated with TUs of the current CU. Video decoder 30 may performinverse transforms on the coefficient blocks to reconstruct transformblocks associated with the TUs of the current CU. Video decoder 30 mayreconstruct the coding blocks of the current CU by adding the samples ofthe predictive sample blocks for PUs of the current CU to correspondingsamples of the transform blocks of the TUs of the current CU. Byreconstructing the coding blocks for each CU of a picture, video decoder30 may reconstruct the picture. Video decoder 30 may store decodedpictures in a decoded picture buffer for output and/or for use indecoding other pictures.

Next generation video applications are anticipated to operate with videodata representing captured scenery with HDR and a WCG. Parameters of theutilized dynamic range and color gamut are two independent attributes ofvideo content, and their specification for purposes of digitaltelevision and multimedia services are defined by several internationalstandards. For example, ITU-R Rec. BT.709, “Parameter values for theHDTV standards for production and international programme exchange,”and/or ITU-R Rec. BT.2020, “Parameter values for ultra-high definitiontelevision systems for production and international programme exchange,”defines parameters for HDTV (high definition television) and UHDTV(ultra-high definition television), respectively, such as standarddynamic range (SDR) and color primaries that extend beyond the standardcolor gamut. Rec. BT.2100: Image parameter values for high dynamic rangetelevision for use in production and international programme exchange”defines transfer functions and representations for HDR television use,including primaries that support wide color gamut representation. Thereare also other standards developing organization (SDOs) documents thatspecify dynamic range and color gamut attributes in other systems, e.g.,DCI-P3 color gamut is defined in SMPTE-231-2 (Society of Motion Pictureand Television Engineers) and some parameters of HDR are defined inSMPTE-2084. A brief description of dynamic range and color gamut forvideo data is provided below.

Dynamic range is typically defined as the ratio between the maximum andminimum brightness (e.g., luminance) of the video signal. Dynamic rangemay also be measured in terms of ‘f-stop,’ where one f-stop correspondsto a doubling of a signal's dynamic range. In MPEG's definition, contentthat features brightness variation with more than 16 f-stops is referredas HDR content. In some terms, levels between 10 and 16 f-stops areconsidered as intermediate dynamic range, but it is considered HDR inother definitions. In some examples of this disclosure, HDR videocontent may be any video content that has a higher dynamic range thantraditionally used video content with a standard dynamic range (e.g.,video content as specified by ITU-R Rec. BT.709).

The human visual system (HVS) is capable for perceiving much largerdynamic ranges than SDR content and HDR content. However, the HVSincludes an adaptation mechanism to narrow the dynamic range of the HVSto a so-called simultaneous range. The width of the simultaneous rangemay be dependent on current lighting conditions (e.g., currentbrightness). Visualization of dynamic range provided by SDR of HDTV,expected HDR of UHDTV and HVS dynamic range is shown in FIG. 2, althoughthe exact range may vary based on each individual and display.

Current video application and services are regulated by ITU Rec.709 andprovide SDR, typically supporting a range of brightness (e.g.,luminance) of around 0.1 to 100 candelas (cd) per m2 (often referred toas “nits”), leading to less than 10 f-stops. Some example nextgeneration video services are expected to provide dynamic range of up to16 f-stops. Although detailed specifications for such content arecurrently under development, some initial parameters have been specifiedin SMPTE-2084 and ITU-R Rec. 2020.

Another aspect for a more realistic video experience, besides HDR, isthe color dimension. Color dimension is typically defined by the colorgamut. FIG. 3 is a conceptual diagram showing an SDR color gamut(triangle 100 based on the BT.709 color primaries), and the wider colorgamut that for UHDTV (triangle 102 based on the BT.2020 colorprimaries). FIG. 3 also depicts the so-called spectrum locus (delimitedby the tongue-shaped area 104), representing the limits of the naturalcolors. As illustrated by FIG. 3, moving from BT.709 (triangle 100) toBT.2020 (triangle 102) color primaries aims to provide UHDTV serviceswith about 70% more colors. D65 specifies an example white color for theBT.709 and/or BT.2020 specifications.

Examples of color gamut specifications for the DCI-P3, BT.709, andBT.2020 color spaces are shown in Table 1.

TABLE 1 Color gamut parameters RGB color space parameters Color Whitepoint Primary colors space x_(W) y_(W) x_(R) y_(R) x_(G) y_(G) x_(B)y_(B) DCI-P3 0.314 0.351 0.680 0.320 0.265 0.690 0.150 0.060 ITU-R0.3127 0.3290 0.64 0.33 0.30 0.60 0.15 0.06 BT.709 ITU-R 0.3127 0.32900.708 0.292 0.170 0.797 0.131 0.046 BT.2020

As can be seen in Table 1, a color gamut may be defined by the X and Yvalues of a white point, and by the x and y values of the primary colors(e.g., red (R), green (G), and blue (B). The x and y values representnormalized values that are derived from the chromaticity (X and Z) andthe brightness (Y) of the colors, as is defined by the CIE 1931 colorspace. The CIE 1931 color space defines the links between pure colors(e.g., in terms of wavelengths) and how the human eye perceives suchcolors.

HDR/WCG video data is typically acquired and stored at a very highprecision per component (even floating point), with the 4:4:4 chromaformat and a very wide color space (e.g., CIE XYZ). This representationtargets high precision and is almost mathematically lossless. However,such a format for storing HDR/WCG video data may include a lot ofredundancies and may not be optimal for compression purposes. A lowerprecision format with HVS-based assumptions is typically utilized forstate-of-the-art video applications.

Typical video data format conversion for purposes of compressionconsists of three major elements, as shown in FIG. 4. The techniques ofFIG. 4 may be performed, for example, by a video preprocessor 17. Thethree elements include a non-linear transfer function (TF) for dynamicrange compacting such that errors due to quantization are perceptuallyuniform (approximately) across the range of luminance values, colorconversion to a more compact or robust color space, andfloating-to-integer representation conversion (quantization). Hence,linear RGB data is compacted using a non-linear transfer function (TF)for dynamic range compacting. For instance, video preprocessor 17 mayinclude a transfer function unit (TF) unit configured to use anon-linear transfer function for dynamic range compacting such thaterrors due to quantization are perceptually uniform (approximately)across the range of luminance values. The compacted data is than runthrough a color conversion process into a more compact or robust colorspace (e.g., via a color conversion unit). Data is then quantized usinga floating-to-integer representation conversion (e.g., via aquantization unit) to produce the video data (e.g., HDR′ data), whichmay be transmitted to video encoder 20.

The inverse conversion at the decoder side is depicted in FIG. 5. Thetechniques of FIG. 5 may be performed by video postprocessor 33. Forexample, video postprocessor 33 may receive video data from videodecoder 30, inverse quantize the data (e.g., via inverse quantizationunit), perform inverse color conversion (e.g., via inverse colorconversion unit), and perform inverse non-linear transfer function(e.g., via inverse TF unit). The order of these elements, e.g., in FIG.4 and FIG. 5, is given as an example, and may vary in real-worldapplications. (e.g., in FIG. 4, color conversion may precede the TFmodule (e.g., TF unit), as well as additional processing, e.g., spatialsubsampling, may be applied to color components.

The techniques depicted in FIG. 4 will now be discussed in more detail.In general, a transfer function is applied to data (e.g., HDR/WCG videodata) to compact the dynamic range of the data such that errors due toquantization are perceptually uniform (approximately) across the rangeof luminance values. Such compaction allows the data to be representedwith fewer bits. In one example, the transfer function may be aone-dimensional (1D) non-linear function and may reflect the inverse ofan electro-optical transfer function (EOTF) of the end-user display,e.g., as specified for SDR in Rec. 709. In another example, the transferfunction may approximate the HVS perception to brightness changes, e.g.,the PQ transfer function specified in SMPTE-2084 for HDR. The inverseprocess of the OETF is the EOTF (electro-optical transfer function),which maps the code levels back to luminance. FIG. 6 shows severalexamples of non-linear transfer function used as EOTFs. The transferfunctions may also be applied to each R, G and B component separately.

In the context of this disclosure, the terms “signal value” or “colorvalue” may be used to describe a luminance level corresponding to thevalue of a specific color component (such as R, G, B, or Y) for an imageelement. The signal value is typically representative of a linear lightlevel (luminance value). The terms “code level” or “digital code value”may refer to a digital representation of an image signal value.Typically, such a digital representation is representative of anonlinear signal value. An EOTF represents the relationship between thenonlinear signal values provided to a display device (e.g., displaydevice 32) and the linear color values produced by the display device.

RGB data is typically utilized as the input color space, since RGB isthe type of data that is typically produced by image-capturing sensors.However, the RGB color space has high redundancy among its componentsand is not optimal for compact representation. To achieve more compactand a more robust representation, RGB components are typically converted(e.g., a color transform is performed) to a more uncorrelated colorspace that is more suitable for compression, e.g., YCbCr. A YCbCr colorspace separates the brightness in the form of luminance (Y) and colorinformation (CrCb) in different less correlated components. In thiscontext, a robust representation may refer to a color space featuringhigher levels of error resilience when compressed at a constrainedbitrate.

Following the color transform, input data in a target color space may bestill represented at high bit-depth (e.g. floating point accuracy). Thehigh bit-depth data may be converted to a target bit-depth, for example,using a quantization process. Certain studies show that 10-12 bitsaccuracy in combination with the PQ transfer is sufficient to provideHDR data of 16 f-stops with distortion below the Just-NoticeableDifference (JND). In general, a JND is the amount that something (e.g.,video data) must be change in order for a difference to be noticeable(e.g., by the HVS). Data represented with 10-bit accuracy can be furthercoded with most of the state-of-the-art video coding solutions. Thisquantization is an element of lossy coding and is a source of inaccuracyintroduced to converted data.

It is anticipated that next generation HDR/WCG video applications willoperate with video data captured at different parameters of HDR and CG.Examples of different configurations can be the capture of HDR videocontent with peak brightness up-to 1000 nits, or up-to 10,000 nits.Examples of different color gamut may include BT.709, BT.2020 as wellSMPTE specified-P3, or others.

It is also anticipated that a single color space, e.g., a target colorrepresentation, that incorporates (or nearly incorporates) all othercurrently used color gamut to be utilized in future. One example of sucha target color representation is BT.2020. Support of a single targetcolor representation would significantly simplify standardization,implementation and deployment of HDR/WCG systems, since a reduced numberof operational points (e.g., number of color containers, color spaces,color conversion algorithms, etc.) and/or a reduced number of requiredalgorithms should be supported by a decoder (e.g., video decoder 30).

In one example of such a system, content captured with a native colorgamut (e.g. P3 or BT.709) different from the target color representation(e.g. BT.2020) may be converted to the target container prior toprocessing (e.g., prior to video encoding). Below are several examplesof such conversion:

RGB conversion from BT.709 to BT.2020 color representation:R ₂₀₂₀=0.627404078626*R ₇₀₉+0.329282097415*G ₇₀₉+0.043313797587*B ₇₀₉G ₂₀₂₀=0.069097233123*R ₇₀₉+0.919541035593*G ₇₀₉+0.011361189924*B ₇₀₉B ₂₀₂₀=0.016391587664*R ₇₀₉+0.088013255546*G ₇₀₉+0.895595009604*B₇₀₉  (eq. 1)

RGB conversion from P3 to BT.2020 color representation:R ₂₀₂₀=0.753832826496*R _(P3)+0.198597635641*G _(P3)+0.047569409186*B_(P3)G ₂₀₂₀=0.045744636411*R _(P3)+0.941777687331*G _(P3)+0.012478735611*B_(P3)B ₂₀₂₀=−0.001210377285*R _(P3)+0.017601107390*G _(P3)+0.983608137835*B_(P3)  (eq. 2)

During this conversion, the value range occupied by each component(R,G,B) of a signal captured in P3 or BT.709 color gamut may be reducedin a BT.2020 representation. Since the data is represented in floatingpoint accuracy, there is no loss; however, when combined with colorconversion (e.g., a conversion from RGB to YCrCB shown in equation 3below) and quantization (example in equation 4 below), the shrinking ofthe value range leads to increased quantization error for input data.

$\begin{matrix}{{{Y^{\prime} = {{0.2627*R^{\prime}} + {0.6780*G^{\prime}} + {0.0593*B^{\prime}}}};}{{{Cb} = \frac{B^{\prime} - Y^{\prime}}{1.8814}};{{Cr} = \frac{R^{\prime} - Y^{\prime}}{1.4746}}}} & \left( {{eq}.\mspace{14mu} 3} \right)\end{matrix}$D _(Y′)=(Round((1<<(BitDepth_(Y)−8))*(219*Y′+16)))D _(Cb)=(Round((1<<(BitDepth_(Cr)−8))*(224*Cb+128)))D _(Cr)=(Round((1<<(BitDepth_(cb)−8))*(224*Cr+128)))  (eq. 4)

In equation (4) D_(Y′) is the quantized Y′ component, D_(Cb) is thequantized Cb and D_(Cr) is the quantized Cr component. The term <<represents a bit-wise right shift. BitDepth_(Y), BitDepth_(Cr), andBitDepth_(Cb) are the desired bit depths of the quantized components,respectively.

In addition, in a real-world coding system, coding a signal with reduceddynamic range may lead to significant loss of accuracy for coded chromacomponents and would be observed by a viewer as coding artifacts, e.g.,color mismatch and/or color bleeding.

FIG. 7 is a simplified conceptual illustration of how video preprocessor17 may generate unique bit sequences that represent a range of valuesfor a color component in a color representation, which may not beoccupying the full value range of the components in the colorrepresentation, might be translated into a range of values for a targetcolor. One-dimensional ranges of component values are shown, including aone-dimensional native range of codewords 910, and a one-dimensional atarget range of codewords 920. For simplicity, and for purposes ofillustration, the native range of codewords (corresponding to range ofcodewords 910) in the example of FIG. 7 is assumed to have 1024codewords (ranging, for example, from 0 to 1023), and the target rangeof codewords (corresponding to range of codewords 920) is assumed tohave a larger number of codewords, such as 2048 (ranging, for example,from 0 to 2047).

Illustrated in FIG. 7 are a number of represented values 910 a in thenative range of codewords 910, where each may correspond to a componentvalue represented in a sample of video data in the native range ofcodewords 910. For simplicity in the illustration of FIG. 7, only a fewrepresented values 910 a are shown along the range of codewords 910, butmany more values 910 a in the range may be present in a typical sampleof video data. Similarly, only the corresponding component values 920 aafter conversion to the target range of codewords are shown in the rangeof codewords 920; in a different example, many more values 920 a may berepresented in the range of codewords 920.

In some examples, a video preprocessor may convert the unadjustedcomponent values 910 a in the native range of codewords 910 to theadjusted values 920 a of target range of codewords 920. For purposes ofillustration, such a process might be illustrated in the manner shown inthe simplified example of FIG. 7. For example, if luma values in anative range of codewords are represented by the one-dimensionalrepresentation 910 of values corresponding to the native range ofcodewords in FIG. 7, luma values could have 1024 possible values (from 0to 1023) in the native range of codewords, with the actual sample ofvideo data including luma values 910 a. Similarly, if those same lumavalues after conversion to a target range of codewords are representedby the one-dimensional representation of codewords 920 of valuescorresponding to the target range of codewords, luma values could have2048 possible values (0 to 2047) in the target range of codewords, withthe sample of video data including luma values 920 a after conversion.Accordingly, the represented values 910 a in the range of codewords 910may be translated, through the conversion process, to the representedvalues 920 a in the range of codewords 920 as shown in FIG. 7. In eachcase, the values 910 a in the range of codewords 910 and values 920 a inthe range of codewords 920 would each be represented by a binarycodeword corresponding to one such value in the range.

In general, in the simplified example of FIG. 7, after color gamutconversion (and dynamic range compaction by a transfer function), theconverted component values may not use all of the available codewords inthe target color representation. In the example of FIG. 7, the targetrange of codewords has twice as many luma codewords as the native rangeof codewords. A conversion and quantization process performed on thecomponent values in the range of codewords 910 may in some cases resultin significantly less than all of the 2048 codewords in the range ofcodewords 920 being used by the luma values after conversion, dependingon the distribution of component values in the range of codewords 910.In other words, a conversion process such as that illustrated in FIG. 7may inefficiently distribute the color values relative to the number oftarget codewords otherwise available in the range of codewords 920, andas a result, might not make efficient use of all possible codewords.Accordingly, the conversion and quantization process may result in asignificant loss of accuracy. This loss of accuracy may have undesirableeffects on the resulting video, including coding artifacts, colormismatch, and/or color bleeding.

To address the problems described above, other techniques may beconsidered. One example technique includes a color gamut aware videocodec. In such a technique, a hypothetical video encoder is configuredto estimate the native color gamut of the input signal and adjust codingparameters (e.g., quantization parameters for coded chroma components)to reduce any distortion resulting from the reduced dynamic range.However, such a technique would not be able to recover loss of accuracy,which may happen due to the quantization conducted in equation (4)above, since all input data is provided to a typical codec in integerpoint accuracy.

This disclosure describes techniques, methods, and apparatuses toperform a dynamic range adjustment (DRA) to compensate dynamic rangechanges introduced to HDR signal representations. The dynamic rangeadjustment may help to prevent and/or lessen any distortion caused,including color mismatch, color bleeding, etc. In one or more examplesof the disclosure, DRA is conducted on the values of each colorcomponent of the target color space, e.g., YCbCr, prior to quantizationat the encoder side (e.g., by source device 12) and after the inversequantization at the decoder side (e.g., by destination device 14). Inview of the foregoing, this disclosure proposes signaling, through oneor more SEI messages, parameters relating to performing such a dynamicrange adjustment, such parameters including information relating toscale and offsets, partitions, global offsets, and local scale andoffsets.

FIG. 8 is a block diagram illustrating an example HDR/WCG conversionapparatus operating according to the techniques of this disclosure. InFIG. 8, solid lines specify the data flow and dashed lines specifycontrol signals. One or more techniques described in this disclosure maybe performed by video preprocessor 19 of source device 12. As discussedabove, video preprocessor 19 may be a separate device from video encoder20. In other examples, video preprocessor 19 may be incorporated intothe same device as video encoder 20.

As shown in FIG. 8, RGB native CG video data 200 is input to videopreprocessor 19. In the context of video preprocessing by videopreprocessor 19, RGB native CG video data 200 is defined by an inputcolor representation. The input color container specifies a set of colorprimaries used to represent video data 200 (e.g., BT. 709, BT. 2020, P3,etc.). In one example of the disclosure, video preprocessor 19 may beconfigured to convert both the color container and the color space ofRGB native CG video data 200 to a target color container and targetcolor space for HDR′ data 216. Like the input color container, thetarget color container may specify a set or color primaries used torepresent the HDR′ data 216. In one example of the disclosure, RGBnative CG video data 200 may be HDR/WCG video, and may have a BT.2020 orP3 color container (or any WCG), and be in an RGB color space. Inanother example, RGB native CG video data 200 may be SDR video, and mayhave a BT.709 color container. In one example, the target colorcontainer for HDR′ data 216 may have been configured for HDR/WCG video(e.g., BT.2020 color container) and may use a color space more optimalfor video encoding (e.g., YCrCb).

In one example of the disclosure, CG converter 202 may be configured toconvert the color container of RGB native CG video data 200 from theinput color container (e.g., first color container) to the target colorcontainer (e.g., second color container). As one example, CG converter202 may convert RGB native CG video data 200 from a BT.709 colorrepresentation to a BT.2020 color representation, example of which isshown below.

The process to convert RGB BT.709 samples (R₇₀₉, G₇₀₉, B₇₀₉) to RGBBT.2020 samples (R₂₀₂₀, G₂₀₂₀, B₂₀₂₀) can be implemented with a two-stepconversion that involves converting first to the XYZ representation,followed by a conversion from XYZ to RGB BT.2020 using the appropriateconversion matrices.X=0.412391*R ₇₀₉+0.357584*G ₇₀₉+0.180481*B ₇₀₉Y=0.212639*R ₇₀₉+0.715169*G ₇₀₉+0.072192*B ₇₀₉Z=0.019331*R ₇₀₉+0.119195*G ₇₀₉+0.950532*B ₇₀₉  (eq. 5)

Conversion from XYZ to R₂₀₂₀G₂₀₂₀B₂₀₂₀ (BT.2020)R ₂₀₂₀=clipRGB(1.716651*X−0.355671*Y−0.253366*Z)G ₂₀₂₀=clipRGB(−0.666684*X+1.616481*Y+0.015768*Z)B ₂₀₂₀=clipRGB(0.017640*X−0.042771*Y+0.942103*Z)  (eq. 6)

Similarly, the single step and recommended method is as follows:R ₂₀₂₀=clipRGB(0.627404078626*R ₇₀₉+0.329282097415*G₇₀₉+0.043313797587*B ₇₀₉)G2020=clip_(RGB)(0.069097233123*R₇₀₉+0.919541035593*G709+0.011361189924*B ₇₀₉)B ₂₀₂₀=clipRGB(0.016391587664*R ₇₀₉+0.088013255546*G₇₀₉+0.895595009604*B ₇₀₉)  (eq. 7)

The resulting video data after CG conversion is shown as RGB target CGvideo data 204 in FIG. 8. In other examples of the disclosure, the colorcontainer for the input data and the output HDR′ data may be the same.In such an example, CG converter 202 need not perform any conversion onRGB native CG video data 200.

Next, transfer function unit 206 compacts the dynamic range of RGBtarget CG video data 204. Transfer function unit 206 may be configuredto apply a transfer function to compact the dynamic range in the samemanner as discussed above with reference to FIG. 4. The color conversionunit 208 converts RGB target CG color data 204 from the color space ofthe input color container (e.g., RGB) to the color space of the targetcolor container (e.g., YCrCb). As explained above with reference to FIG.4, color conversion unit 208 converts the compacted data into a morecompact or robust color space (e.g., a YUV or YCrCb color space) that ismore suitable for compression by a hybrid video encoder (e.g., videoencoder 20).

Adjustment unit 210 is configured to perform a dynamic range adjustment(DRA) of the color converted video data in accordance with DRAparameters derived by DRA parameters estimation unit 212. In general,after CG conversion by CG converter 202 and dynamic range compaction bytransfer function unit 206, the actual color values of the resultingvideo data may not use all available codewords (e.g., unique bitsequences that represent each color) allocated of a particular targetcolor representation. That is, in some circumstances, the conversion ofRGB native CG video data 200 from an input color representation to anoutput color representation may overly compact the color values (e.g.,Cr and Cb) of the video data such that the resultant compacted videodata does not make efficient use of all possible color values. Asexplained above, coding a signal with a reduced range of values for thecolors may lead to a significant loss of accuracy for coded chromacomponents and would be observed by a viewer as coding artifacts, e.g.,color mismatch and/or color bleeding.

Adjustment unit 210 may be configured to apply DRA parameters to thecolor components (e.g., YCrCb) of the video data, e.g., RGB target CGvideo data 204 after dynamic range compaction and color conversion tomake full use of the codewords available for a particular target colorrepresentation. Adjustment unit 210 may apply the DRA parameter to thevideo data at a pixel level. In general, the DRA parameters define afunction that expands the codewords used to represent the actual videodata to as many of the codewords available for the target colorrepresentation as possible. As is further described below, the processfor expanding the codewords used to represent the actual video mayinclude partitioning the codeword range, and applying a scale and offsetto each such partition.

In one example of the disclosure, the DRA parameters include a scale andoffset value that are applied to the components of the video data. Ingeneral, the lower the value range of the color components of the videodata, the larger a scaling factor may be used. The offset parameter maybe used to center the values of the color components to the center ofthe available codewords for a target color representation. For example,if a target color representation includes 1024 codewords per colorcomponent, an offset value may be chosen such that the center codewordis moved to codeword 512 (e.g., the middle most codeword). In otherexamples, the offset parameter may be used to provide better mapping ofinput codewords to output codewords such that overall representation inthe target color representation is more efficient in combating codingartifacts.

In one example, adjustment unit 210 applies DRA parameters to video datain the target color space (e.g., YCrCb) as follows:Y″=scale1*Y′+offset1Cb″=scale2*Cb′+offset2Cr″=scale3*Cr′+offset3  (eq. 8)where signal components Y′, Cb′ and Cr′ is a signal produced from RGB toYCbCr conversion (example in equation 3). Note that Y′, Cr′ and Cr′ mayalso be a video signal decoded by video decoder 30. Y″, Cb″, and Cr″ arethe color components of the video signal after the DRA parameters havebeen applied to each color component. As can be seen in the exampleabove, each color component is related to different scale and offsetparameters. For example, scale1 and offset1 are used for the Y′component, scale2 and offset2 are used for the Cb′ component, and scale3and offset3 are used for the Cr′ component. It should be understood thatthis is just an example. In other examples, the same scale and offsetvalues may be used for every color component.

As can be seen in the above example, adjustment unit 210 may applydynamic range adjustment parameters, such the scale and offset DRAparameters, as a linear function. As such, it is not necessary foradjustment unit 210 to apply the DRA parameters in the target colorspace after color conversion by color conversion unit 208. This isbecause color conversion is itself a linear process. As such, in otherexamples, adjustment unit 210 may apply the DRA parameters to the videodata in the native color space (e.g., RGB) before any color conversionprocess. In this example, color conversion unit 208 would apply colorconversion after adjustment unit 210 applies the DRA parameters.

In other examples, and as further described below in connection withFIG. 9A through FIG. 9C, each color component may be associated withmultiple scale and offset parameters, and the range of codewords may bedivided into multiple partitions. For example, the actual distributionof chroma values for the Cr or Cb color components may differ fordifferent portions of codewords, and may not be uniform over the rangeof codewords. In such a situation (or in other situations), it may bebeneficial to divide the range of codewords into multiple partitions,and apply a scale and offset to each partition. One or more globaloffsets may be applied to some or all of the partitions.

In some examples, adjustment unit 210 may apply the DRA parameters ineither the target color space or the native color space as follows:Y″=(scale1*(Y′−offsetY)+offset1)+offsetY;Cb″=scale2*Cb′+offset2Cr″=scale3*Cr′+offset3  (eq. 9)In this example, the parameter scale1, scale2, scale3, offset1, offset2,and offset3 have the same meaning as described above. The parameteroffsetY is a parameter reflecting brightness of the signal, and can beequal to the mean value of Y′. In other examples, an offset parametersimilar to offset Y may be applied for the Cb′ and Cr′ components tobetter preserve the mapping of the center value in the input and theoutput representations.

In another example of the disclosure, adjustment unit 210 may beconfigured to apply the DRA parameters in a color space other than thenative color space or the target color space. In general, adjustmentunit 210 may be configured to apply the DRA parameters as follows:X′=scale1*(X−offset1)+offset2+offset3;Y′=scale2*(Y−offset4)+offset5+offset6Z′=scale3*(Z−offset7)+offset8+offset9  (eq. 10)where signal components X, Y and Z are signal components in a colorspace which is different from target color space, e.g., RGB or anintermediate color space. The values X, Y, and Z may simply be variablesor references to signal components, and should not be confused with theXYZ color space.

FIG. 9A is a simplified conceptual illustration of how unique bitsequences that represent a range of values for a color component in anative range of codewords might be converted by video preprocessor 19 ofFIG. 8 into a range of values for a target range of codewords inaccordance with one or more aspects of the present disclosure.One-dimensional ranges of component values are shown in FIG. 9A,including a one-dimensional native range of codewords 1210 correspondingto a native range of codewords, and a one-dimensional target range ofcodewords 1220 that corresponds to a target range of codewords. In amanner similar to that described in connection with FIG. 7, forsimplicity and for purposes of illustration, the range of componentvalues for the native range of codewords (corresponding to range 1210)in the example of FIG. 9A is assumed to have 1024 codewords, and therange of component values for the target range of codewords(corresponding to range of codewords 1220) is assumed to have 2048codewords. For example, if the one-dimensional native range of codewords1210 represents luma values, there could be 1024 possible luma values inthe range of codewords 1210 corresponding to the native range ofcodewords. If the one-dimensional target range of codewords 1220represents the luma values in the target range of codewords, there couldbe 2048 possible luma values in the range of codewords 1220corresponding to the target range of codewords.

Illustrated in FIG. 9A are a number of represented values 1210 a in thenative range of codewords 1210, which each correspond to a componentvalue represented in a sample of video data in the native range ofcodewords 1210. For simplicity in the illustration of FIG. 9A, only afew represented values 1210 a are shown in the range of codewords 1210,but many more component values 1210 a in the range of codewords 1210 maybe present in a typical sample of video data.

In some cases, the values 1210 a for a sample of video data might not beuniformly spread over the range of codewords 1210, and may beconcentrated in a relatively small number of regions within the range ofcodewords 1210. Although the illustration in FIG. 9A is a simplifiedexample, such a non-uniform representation is nevertheless apparent inFIG. 9A, because range of codewords 1210 shows a number of componentvalues 1210 a near the ends of the range of codewords 1210, but novalues generally in the middle of the range (i.e., in the rangecodewords between 169 and 702).

In some examples, video preprocessor 19 may apply a global offset valueto the range of codeword values 1210 in FIG. 9A when performing dynamicrange adjustment to efficiently map unadjusted component values 1210 ain the range of codeword values 1210 to adjusted component values 1220 ain the range of component values 1220. For instance, in FIG. 9A, videopreprocessor 19 may choose a first global offset value 119 in theunadjusted range of codewords 1210, which is one of the component values1210 a in the range of codewords 1210. Video preprocessor 19 may choosea second global offset value to be 0, which in the example of FIG. 9A isthe adjusted value in the range of codewords 1220 that the first globaloffset (119) maps to when performing dynamic range adjustment.

In some examples, there may be unadjusted component values in the rangeof codewords 1210 that are less than the global offset value. In therange of codewords 1210 in FIG. 9A, there is one such component value1210 a (having a value of 60). In some examples, video preprocessor 19may ignore this value, particularly where the unadjusted component valuethat is less than the first global offset will not have a significanteffect on the decoded video data. In other examples, any component value1210 a less than the first global offset value (119) in range ofcodewords 1210 may be clipped to the first global offset value (119), orin other words, video preprocessor 19 may assume it to be equal to thefirst global offset value (119). In such an example, video preprocessor19 may modify the unadjusted value 60 prior to performing dynamic rangeadjustment so that it has an unadjusted component value of 119 withinrange of codewords 1210, rather than an unadjusted component value of60.

Video preprocessor 19 may choose an appropriate scale value to be usedin conjunction with the global offset values. Accordingly, in theexample of FIG. 9A, video preprocessor 19 may use such dynamic rangeparameters to translate unadjusted component values 1210 a in range ofcodewords 1210 to values 1220 a in range of codewords 1220. In someexamples, such dynamic range adjustment parameters may be chosen so thatwhen converting values 1210 a to the range of codewords 1220, availablecodewords in the range of codewords 1220 are used in an efficientmanner. For example, video preprocessor 19 may calculate a linear scalevalue based on assumptions that the dynamic range adjustment willtranslate the first global offset (unadjusted value 119) into the secondglobal offset (adjusted value 0), and that the dynamic range adjustmentwill translate the last unadjusted value 1210 a (having an unadjustedvalue of 852) in the range of code words 1210 is translated into anadjusted value of 2047 in the range of codewords 1210. Based on suchassumptions in the simplified example of FIG. 9A, video preprocessor 19may determine that the following formula can be used to translateunadjusted component values 1210 a from range of codewords 1210 intoadjusted component values 1220 a in the range of codewords 1220:A1220=2.793*(U1210−119)+0  (eq. 11)

In the equation above, A₁₂₂₀ is an adjusted component value in the rangeof codewords 1220, and U₁₂₁₀ is an unadjusted component value in therange of codewords 1210. In this formula the scale value is calculatedto be 2.793, and the first global offset value is 119, and the secondglobal offset value is 0.

The effect of the dynamic range adjustment performed by videopreprocessor 19 and illustrated in FIG. 9A is that values in the rangeof codewords 1210 are translated into values in the range of codewords1220 in a way such that that the adjusted component values are spreadwithin the range of codewords 1220 to effectively use more codewords inthe range of codewords 1220. In some examples, video preprocessor 19chooses scale and global offset values so that component valuesrepresented in the video data (values 1210 a in the range of codewords1210), are spread out among as many a codewords along the range ofcodewords 1220 as is beneficial. In further examples, even when the bitdepth and/or the codewords corresponding to ranges 1210 and 1220 are thesame, it may be possible for video preprocessor 19 to translate valuesinto values in the range of codewords 1220 so that the adjustedcomponent values are spread within the range of codewords 1220 toeffectively use more codewords in the range of codewords 1220. In someexamples, one way in which this may be possible is to map unadjustedvalues at or below a global offset value to the first value in the rangeof codewords 1220 (e.g., map value 1210 a to adjusted value 0).

FIG. 9B is another simplified conceptual illustration of how videopreprocessor 19 may translate unique bit sequences that represent arange of values for a color component in a native range of codewordsinto a range of values for a target range of codewords. As in FIG. 9A,one-dimensional ranges of component values are shown in FIG. 9B,including a one-dimensional native range of codewords 1230 correspondingto a native range of codewords, and a one-dimensional target range ofcodewords 1240 that corresponds to a target range of codewords. Forsimplicity, and for purposes of illustration, the range of componentvalues for the native color representation (corresponding to the rangeof codewords 1230) in the example of FIG. 9B is assumed to have 1024codewords, and the range of component values for the target range ofcodewords (corresponding to the range of codewords 1240) is assumed tohave 2048 codewords. For example, in a manner similar to FIG. 9A, if theone-dimensional native range of codewords 1230 represents luma values,there could be 1024 possible luma values in the range of codewords 1230corresponding to the native range of codewords. If the one-dimensionaltarget range of codewords 1240 represents the luma values in the targetrange of codewords, there could be 2048 possible luma values in therange of codewords 1240 corresponding to the target range of codewords.

Illustrated in FIG. 9B are a number of represented values 1230 a in thenative range of codewords 1230, which each correspond to a componentvalue represented in a sample of video data in the native range ofcodewords 1230. For simplicity in the illustration of FIG. 9B, only afew represented values 1230 a are shown in the range of codewords 1230,but many more component values 1230 a in the range of codewords 1230 maybe present in a typical sample of video data.

As illustrated in FIG. 9B, and in some examples, video preprocessor 19may determine that further efficiencies in performing dynamic rangeadjustment may be gained by dividing the range of codewords 1230 intomultiple partitions. Video preprocessor 19 may determine scale andoffset values for each partition, which video preprocessor 19 uses tomap unadjusted component values 1230 a in each partition to adjustedcomponent values 1240 a in the range of component values 1240. If videopreprocessor 19 chooses the scale and offset parameters to efficientlyuse the codewords of the target range of codewords 1240, it may bepossible to efficiently represent the video data in the target range ofcodewords 1240, and may also result in higher quality decoded videodata.

For instance, in FIG. 9B, video preprocessor 19 divides the range ofcodewords 1230 into five partitions (1231, 1232, 1233, 1234, and 1235).Partition 1231 corresponds to codewords 0 to 118 (inclusive) in therange of codewords 1230, and includes only one represented componentvalue (component value 60). Partition 1232 corresponds to codewords 119to 168, and in the simplified example of FIG. 9B, the video samplerepresented by the range of codewords 1210 includes three componentvalues 1230 a in partition 1232 (component values 119, 132, and 168).Partition 1233 corresponds to codewords 169 to 702, and the video samplerepresented by range of codewords 1230 includes no component values inthis range. Partition 1234 corresponds to codewords 703 to 852, and thevideo sample represented by range of codewords 1230 includes threecomponent values 1230 a in this partition (component values 703, 767,and 852). Finally, the fifth partition, partition 1235, ranges fromcodeword 853 to codeword 1023, and the video sample represented by rangeof codewords 1230 includes no component values in this range.

Video preprocessor 19 chooses partitions and appropriate scale andoffset values so that performing dynamic range adjustment on thecomponent values shown in the range of codewords 1230 will result inusing the available codewords in the range of codewords 1240 in anefficient manner. In the example of FIG. 9B, video preprocessor 19allocates to partitions that include values (e.g., partitions 1232 and1234) a portion of the range of codewords 1240, whereas videopreprocessor 19 allocates to partitions including no values (partitions1231, 1233, 1225) no portion of the range of codewords 1240. Similarly,the size of the portion of range 1240 that video preprocessor 19allocates to partitions depends on the size of the correspondingpartition 1231, 1232, 1233, 1234, and 1235. For a larger or widerpartitions on range 1230, a larger portion of range 1240 is allocated.

Further, in some cases, as previously described in connection with FIG.9A, video preprocessor 19 may determine that it may be beneficial toomit or ignore certain values in the range of codewords 1230, such as,for example, values at the extreme ends of the range of codewords 1230.To the extent that such values may be few in number, and/or where suchvalues do not affect the decoded video data in a significant way, someefficiencies may be gained by omitting such values. For instance, withrespect to partition 1211 in the example of FIG. 9B, some efficienciesmay be gained if the video preprocessor 19 ignores the single codewordhaving a component value of 60 represented by the video data inpartition 1231, so in the example of FIG. 9B, video preprocessor 19 doesnot allocate that partition 1231 any portion of the range of codewords1240.

Accordingly, in the example of FIG. 9B, video preprocessor 19 translatespartition 1232, which spans 50 values or codewords (119 through 168) inthe range of codewords 1230, into a partition 1242 spanning codewords 0through 511 of range of codewords 1240. Video preprocessor 19 translatespartition 1234, which spans 150 codewords in the range of codewords1230, into a partition 1244 in the range of codewords 1240 spanningcodewords 512 through 2047. As a result, the partition 1242 in the rangeof codewords 1240 spans 512 codewords along range of codewords 1240, andthe partition 1244 in the range of codewords 1240 spans 1536 codewordsalong range of codewords 1240. The partition 1244 is therefore threetimes the size of partition 1242. In the example of FIG. 9B, videopreprocessor 19 may have chosen the partition sizes in this way becausethe partitions 1232 and 1234 were similarly proportioned (i.e.,partition 1234 is three times the size of partition 1232), therebymaintaining the relative size of the partitions 1232 and 1234 whendynamic range adjustment translates those partitions into adjustedcomponent values within partitions 1242 and 1244 in the range ofcodewords 1240. In other examples, video preprocessor 19 might notmaintain the proportions of partitions along range of codewords 1230 inthis manner when dynamic range adjustment is applied to values in therange of codewords 1230 to translate those partitions to values in therange of codewords 1240.

In other examples, video preprocessor 19 may maintain the proportions ofpartitions along range of codewords 1230 in a different way. Stillreferring to the example of FIG. 9B, video preprocessor 19 may apply ascale and offset value (e.g., a local scale and local offset) in amanner local to each of the partitions in the range of codeword values1230, to translate unadjusted component values 1230 a in thosepartitions to adjusted component values 1240 a in partitions 1242 and1244 along range of codewords 1240. For example, for partition 1232,video preprocessor 19 may calculate linear scale and offset values basedon assumptions that the first unadjusted value of 119 in partition 1232maps to an adjusted value of 0 in partition 1242, and the lastunadjusted value of 168 in partition 1232 maps to an adjusted value of511 in partition 1242. Based on such assumptions in the simplifiedexample of FIG. 9B, video preprocessor 19 may determine that thefollowing formula can be used to translate unadjusted component valuesfrom partition 1232 into adjusted component values from partition 1242:A ₁₂₄₂=10.429*U ₁₂₃₂+−1241.1  (eq. 12)

In the equation above, A₁₂₄₂ is an adjusted component value in partition1242 within the range of codewords 1240, and U₁₂₃₂ is an unadjustedcomponent value in partition 1232 within the range of codewords 1230. Inthis formula, the local scale value for the partition 1232 is 10.429,and the local offset value for the partition 1232 is −1241.1.

Similarly, video preprocessor 19 may calculate linear scale and offsetvalues for converting unadjusted component values in partition 1234 intoadjusted component values in partition 1244 based on assumptions thatthe first unadjusted value of 703 in partition 1234 corresponds to anadjusted value of 512 in partition 1244, and the last unadjusted valueof 852 in partition 1234 corresponds to an adjusted value of 2047 inpartition 1244. Based on such assumptions, video preprocessor 19 maydetermine that the following formula may be used to translate unadjustedcomponent values from partition 1234 into adjusted component values inpartition 1244:A ₁₂₄₄=10.302*U ₁₂₃₄+−6730.3  (eq. 13)

In the equation above, A₁₂₄₄ is an adjusted component value in partition1244 within the range of codewords 1240, and U₁₂₃₄ is an unadjustedcomponent value in partition 1234 within the range of codewords 1230. Inthis formula, the local scale value for the partition 1234 is 10.302,and the local offset value for the partition 1234 is −6730.3.

In the example of FIG. 9B, video preprocessor 19 does not allocate topartitions 1231, 1233, and 1235 any of the range of codewords 1240,which may enable a more efficient use of range of codewords 1240, andmay allow more of the range of codewords 1240 to be used for partitionswhere the video data includes more values (e.g., partitions 1232 and1234). In such an example, partitions 1231, 1233, and 1235 may not haveany corresponding partition in the range of codewords 1240. In someexamples, video preprocessor 19 may ignore or drop any unadjustedcomponent values that might be included in a video data samplecorresponding to partitions 1231, 1233, and 1235. In other examples,video preprocessor 19 may map any unadjusted component values that mightbe included in partitions 1231, 1233, and 1235 to an appropriate valuein one of the other partitions, or video preprocessor 19 may map suchvalues to a value on or near a border between partitions allocated inthe range of codewords 1240, or video preprocessor 19 may map suchvalues to one of the two ends of the range of codewords 1240.Alternatively, video preprocessor 19 may allocate (or logicallyallocate) a small partition, or one having size of zero, and videopreprocessor 19 may apply appropriate local scale and offset values forsuch a partition to map unadjusted component values for such partitionsinto adjusted component values in the range of codewords 1240.

The effect of the dynamic range adjustment illustrated in FIG. 9B isthat video preprocessor 19 translates values in the range of codewords1230 into values in the range of codewords 1240 in a way such that thatthe values in partitions 1232 and 1234 are spread within the range ofcodewords 1240 to effectively use more codewords in the range ofcodewords 1240. In some examples, video preprocessor 19 chooses thelocal scale and local offset values, for each partition, so thatcomponent values represented in the video data, as represented by values1230 a in the range of codewords 1230, are spread out among as manycodewords along the range of codewords 1240 as possible. In some cases,such as where there are large number of values 1230 a within certainranges, such an adjustment may be beneficial. Video preprocessor 19performing dynamic range adjustment in a manner similar to thatdescribed in connection with FIG. 9B in such a case may result inpreventing or reducing any loss of accuracy for coded component values,and therefore, may prevent coding artifacts (e.g., color mismatch and/orcolor bleeding) from being observed by a viewer of the decoded videodata.

In some examples, video preprocessor 19 may gain further efficiencies bychoosing a global offset value that may be applied to the range ofcodewords 1230 and 1240 in FIG. 9B, in a manner similar to thatdescribed in connection with FIG. 9A. For instance, in FIG. 9B, videopreprocessor 19 may choose a global offset value of 119, so that anyvalues less than 119 in the range of codewords 1210 may be assumed to bethe unadjusted value 119. In such an example, video preprocessor 19would assume that the unadjusted component value 60 in partition 1231has a value of 119, rather than 60, and would therefore be included inpartition 1232. In some examples, video preprocessor 19 modifying avalue before performing a dynamic range adjustment may be preferable toignoring the value or not performing a dynamic range adjustment on thevalue.

In the example of FIG. 9B, video preprocessor 19 translates the globaloffset value for the unadjusted component value 119 into an adjustedcomponent value of 0 along range of codewords 1240. The adjusted value 0that corresponds to the global offset value for the unadjusted value 119may itself be used as a second global offset value in a manner similarto that described in connection with FIG. 9A. This second global offsetvalue may be considered the adjusted value corresponding to unadjustedvalue 119, or put another way, the first global offset value (unadjustedcomponent value in the range of codewords 1230) may map to the secondglobal offset value (adjusted component value in the range of codewords1240).

The equations {12} and {13} described previously for performing adynamic range adjustment for values in partitions 1212 and 1214, can berewritten in terms of these above-described global offset values.Specifically, video preprocessor 19 may determine a differentrelationship may apply to partition 1232 when one or more global offsetvalues are used. Accordingly, equation {12} can be rewritten as follows:A ₁₂₄₂=10.429*(U ₁₂₃₂+−119)+0+0  (eq. 14)

In the equation above, A₁₂₄₂ is an adjusted component value in partition1242 within the range of codewords 1240, and U₁₂₃₂ is an unadjustedcomponent value in partition 1232 within the range of codewords 1230. Inthis formula, the (first) global offset value for the unadjustedcomponent values in the range of codewords 1230 is −119, and the(second) global offset value for the adjusted component values in therange of codewords 1240 is 0. The scale value for the partition 1232 is10.429, and the offset value for the partition 1232 is 0.

Similarly, video preprocessor 19 may determine that a differentrelationship may apply to partition 1234 when one or more global offsetvalues are used. Accordingly, equation {13} can be rewritten as follows:A ₁₂₄₄=10.302*(U ₁₂₃₄+−119)+0+−5504.4  (eq. 15)

In the equation above, A₁₂₄₄ is an adjusted component value in partition1244 within the range of codewords 1240, and U₁₂₃₄ is an unadjustedcomponent value in partition 1234 within the range of codewords 1230. Inthis formula, the (first) global offset value for the unadjustedcomponent values in the range of codewords 1230 is −119, and the(second) global offset value for the adjusted component values in therange of codewords 1240 is 0. The scale value for the partition 1234 is10.302, and the offset value for the partition −5504.4.

FIG. 9C is another simplified conceptual illustration of how videopreprocessor 19 may translate unique bit sequences that represent arange of values for a color component in a native range of codewordsinto a range of values for a target range of codewords. As in FIG. 9Aand FIG. 9B, one-dimensional ranges of component values are shown inFIG. 9C, including a one-dimensional native range of codewords 1250corresponding to a native range of codewords, and a one-dimensional atarget range of codewords 1260 that corresponds to a target range ofcodewords. In this example, the range of component values for the nativerange of codewords (corresponding to the range of codewords 1250) isassumed to correspond to 2048 codewords, and the range of componentvalues for the target range of codewords (corresponding to the range ofcodewords 1260) is assumed to correspond to 2048 codewords. For example,if the one-dimensional native range of codewords 1250 represents lumavalues, there could be 2048 possible luma values in the range ofcodewords 1250 corresponding to the native range of codewords. If theone-dimensional target range of codewords 1260 represents the lumavalues in the target range of codewords, there could be 2048 possibleluma values in the range of codewords 1260 corresponding to the targetrange of codewords.

The example of FIG. 9C illustrates that a dynamic range adjustmentperformed by video preprocessor 19 in accordance with one or moreaspects of the present disclosure may be beneficial even when the nativerange of codewords (corresponding to the range of codewords 1250 in FIG.9C) is the same size or substantially the same size as the target rangeof codewords (corresponding to the range of codewords 1260 in FIG. 9C).Illustrated in FIG. 9C are a number of represented values 1250 a in thenative range of codewords 1250. For simplicity, only a few representedvalues 1250 a are shown.

As illustrated in FIG. 9C, video preprocessor 19 may divide the range ofcodewords 1250 into multiple partitions. Video preprocessor 19 maycalculate and use scale and offset values for each partition to mapunadjusted component values 1250 a in each partition to adjustedcomponent values 1260 a in the range of component values 1260. Videopreprocessor 19 may choose dynamic range adjustment parameters toefficiently use the codewords of the target range of codewords 1260. Forinstance, in FIG. 9C, video preprocessor 19 may divide the range ofcodewords 1250 into five partitions (1251, 1252, 1253, 1254, and 1255).As with other examples, in the example of FIG. 9C, video preprocessor 19allocates a portion of the range of codewords 1260 to those partitionsthat include values, whereas video preprocessor 19 might not allocateany portion of the range of codewords 1260 to those partitions thatinclude no values. Similarly, video preprocessor 19 may allocate alarger portion of the range of codewords 1260 to those partitions in therange of codewords 1250 that are wider or span more values than anotherpartition in 1250. Further, with respect to partition 1251 in theexample of FIG. 9C, video preprocessor 19 does not allocate any portionof the range of codewords 1260 to partition 1251, even though thatpartition includes a component value of 120.

Accordingly, video preprocessor 19 in the example of FIG. 9C translatespartition 1252, which spans 100 values or codewords (238 through 337) inthe range of codewords 1250, into a partition 1262 spanning codewords 0through 511 of the range of codewords 1260. Video preprocessor 19translates partition 1254, which spans 300 codewords in the range ofcodewords 1250, into a partition 1264 in the range of codewords 1260spanning codewords 512 through 2047.

Still referring to the example of FIG. 9C, video preprocessor 19 maycalculate and apply a scale and offset value, in a manner local to eachof the partitions in the range of codeword values 1250, to translateunadjusted component values in those partitions to adjusted componentvalues in partitions 1262 and 1264 along range of codewords 1260. Forexample, for partition 1252, video preprocessor 19 may calculate linearscale and offset values based on assumptions that the first unadjustedvalue of 238 in partition 1252 maps to an adjusted value of 0 inpartition 1262, and the last unadjusted value of 337 in partition 1252maps to an adjusted value of 511 in partition 1262. Based on suchassumptions in the simplified example of FIG. 9C, video preprocessor 19may determine that following relationship may be used to translateunadjusted component values from partition 1212 into adjusted componentvalues from partition 1222:A ₁₂₆₂=5.162*(U ₁₂₅₂+−238)+0+0  (eq. 16)

In the equation above, A₁₂₆₂ is an adjusted component value in partition1262 within the range of codewords 1260, and U₁₂₅₂ is an unadjustedcomponent value in partition 1252 within the range of codewords 1250. Inthis formula, the (first) global offset value is −238, and the (second)global offset value is 0. The local scale value for the partition 1252is 5.162, and the local offset value for the partition 1252 is 0.

Similarly, video preprocessor 19 may calculate linear scale and offsetvalues for converting unadjusted component values in partition 1254 intoadjusted component values in partition 1264 based on assumptions thatthe first unadjusted value of 1406 in partition 1254 corresponds to anadjusted value of 512 in partition 1264, and the last unadjusted valueof 1705 in partition 1254 corresponds to an adjusted value of 2047 inpartition 1264. Based on such assumptions, video preprocessor 19 maydetermine that the following relationship may be used to translateunadjusted component values from partition 1254 into adjusted componentvalues in partition 1264:A ₁₂₆₄=5.134*(U ₁₂₅₄+−238)+0+−5484.5  (eq. 17)

In the equation above, A₁₂₆₄ is an adjusted component value in partition1264 within the range of codewords 1260, and U₁₂₅₄ is an unadjustedcomponent value in partition 1254 within the range of codewords 1250. Inthis formula, the (first) global offset value is −238, and the (second)global offset value is 0. The local scale value for the partition 1254is 5.134, and the local offset value for the partition 1254 is −5484.5.

Again, the effect of the dynamic range adjustment illustrated in FIG. 9Cis that video preprocessor 19 translates values in the range ofcodewords 1250 into values in the range of codewords 1260 in a way suchthat that the values in partitions 1252 and 1254 are spread within therange of codewords 1260 to effectively use more codewords of the rangeof codewords 1260. In some examples, video preprocessor 19 performingdynamic range adjustment in a manner similar to that described inconnection with FIG. 9C may result in preventing or reducing any loss ofaccuracy for coded component values, and therefore, may prevent codingartifacts (e.g., color mismatch and/or color bleeding) from beingobserved by a viewer of the decoded video data.

As further described below, and in accordance with one or more aspectsof the present disclosure, one or more new SEI messages may includeparameters and/or information relating to performing the dynamic rangeadjustment described above. The dynamic range adjustment parameters orinformation may be generated by the video preprocessor 19, and encodedby the video decoder 30 as an SEI message. Such SEI messages may includeinformation sufficient to enable video decoder 30 and/or videopostprocessor 31 to perform the inverse of the dynamic range adjustmentto reconstruct the video data.

In other examples of the disclosure, adjustment unit 210 may beconfigured to apply a linear transfer function to the video to performDRA. Such a transfer function may be different from the transferfunction used by transfer function unit 206 to compact the dynamicrange. Similar to the scale and offset terms defined above, the transferfunction applied by adjustment unit 210 may be used to expand and centerthe color values to the available codewords in a target colorrepresentation. An example of applying a transfer function to performDRA is shown below:Y″=TF2(Y′)Cb″=TF2(Cb′)Cr″=TF2(Cr′)Term TF2 specifies the transfer function applied by adjustment unit 210.In some embodiments the adjustment unit may apply different transferfunctions to each of the components.

In another example of the disclosure, adjustment unit 210 may beconfigured to apply the DRA parameters jointly with the color conversionof color conversion unit 208 in a single process. That is, the linearfunctions of adjustment unit 210 and color conversion unit 208 may becombined. An example of a combined application, where f1 and f2 are acombination of the RGB to YCbCr matrix and the DRA scaling factors, isshown below:

${{Cb} = \frac{B^{\prime} - Y^{\prime}}{f\; 1}};{{Cr} = \frac{R^{\prime} - Y^{\prime}}{f\; 2}}$

In another example of the disclosure, after applying the DRA parameters,adjustment unit 210 may be configured to perform a clipping process toprevent the video data from having values outside the range of codewordsspecified for a certain target color representation. In somecircumstances, the scale and offset parameters applied by adjustmentunit 210 may cause some color component values to exceed the range ofallowable codewords. In this case, adjustment unit 210 may be configuredto clip the values of the components that exceed the range to themaximum value in the range.

The DRA parameters applied by adjustment unit 210 may be determined byDRA parameters estimation unit 212. The frequency and the time instancesat which the DRA parameters estimation unit 212 updates the DRAparameters is flexible. For example, DRA parameters estimation unit 212may update the DRA parameters on a temporal level. That is, new DRAparameters may be determined for a group of pictures (GOP), or a singlepicture (frame). In this example, the RGB native CG video data 200 maybe a GOP or a single picture. In other examples, DRA parametersestimation unit 212 may update the DRA parameters on a spatial level,e.g., at the slice tile, or block level. In this context, a block ofvideo data may be a macroblock, coding tree unit (CTU), coding unit, orany other size and shape of block. A block may be square, rectangular,or any other shape. Accordingly, the DRA parameters may be used for moreefficient temporal and spatial prediction and coding.

In other examples of the disclosure, DRA parameters estimation unit 212may be configured to derive values for DRA parameters so as to minimizecertain cost functions associated with preprocessing and/or encodingvideo data. As one example, DRA parameters estimation unit 212 may beconfigured to estimate DRA parameters that minimized quantization errorsintroduced by quantization unit 214 (e.g., see equation (4)) above. DRAparameters estimation unit 212 may minimize such an error by performingquantization error tests on video data that has had different sets ofDRA parameters applied. In another example, DRA parameters estimationunit 212 may be configured to estimate DRA parameters that minimize thequantization errors introduced by quantization unit 214 in a perceptualmanner. DRA parameters estimation unit 212 may minimize such an errorbased on perceptual error tests on video data that has had differentsets of DRA parameters applied. DRA parameters estimation unit 212 maythen select the DRA parameters that produced the lowest quantizationerror.

In another example, DRA parameters estimation unit 212 may select DRAparameters that minimize a cost function associated with both the DRAperformed by adjustment unit 210 and the video encoding performed byvideo encoder 20. For example, DRA parameters estimation unit 212 mayperform DRA and encode the video data with multiple different sets ofDRA parameters. DRA parameters estimation unit 212 may then calculate acost function for each set of DRA parameters by forming a weighted sumof the bitrate resulting from DRA and video encoding, as well as thedistortion introduced by these two lossy process. DRA parametersestimation unit 212 may then select the set of DRA parameters thatminimizes the cost function.

In each of the above techniques for DRA parameter estimation, DRAparameters estimation unit 212 may determine the DRA parametersseparately for each component using information regarding thatcomponent. In other examples, DRA parameters estimation unit 212 maydetermine the DRA parameters using cross-component information. Forexample, the DRA parameters derived for a Cr component may be used toderive DRA parameters for a Cb component.

In video coding schemes utilizing weighted prediction, a sample ofcurrently coded picture Sc are predicted from a sample (for singledirectional prediction) of the reference picture Sr taken with a weight(W_(wp)) and an offset (O_(wp)) which results in predicted sample Sp:Sp=Sr·*W _(wp) +O _(wp).

In some examples utilizing DRA, samples of the reference and currentlycoded picture can be processed with DRA employing different parameters,namely {scale1_(cur), offset1_(cur)} for a current picture and{scale1_(ref), offset1_(ref)} for a reference picture. In suchembodiments, parameters of weighted prediction can be derived from DRA,e.g.:W _(wp)=scale1_(cur)/scale1_(ref)O _(wp)=offset1_(cur)−offset1_(ref)

After adjustment unit 210 applies the DRA parameters, video preprocessor19 may then quantize the video data using quantization unit 214.Quantization unit 214 may operate in the same manner as described abovewith reference to FIG. 4. After quantization, the video data is nowadjusted in the target color space and target primaries of the targetcolor container of HDR′ data 216. HDR′ data 216 may then be sent tovideo encoder 20 for compression.

FIG. 10 is a block diagram illustrating an example HDR/WCG inverseconversion apparatus according to the techniques of this disclosure. Asshown in FIG. 10, video postprocessor 31 may be configured to apply theinverse of the techniques performed by video preprocessor 19 of FIG. 8.In other examples, the techniques of video postprocessor 31 may beincorporated in, and performed by, video decoder 30.

In one example, video decoder 30 may be configured to decode the videodata encoded by video encoder 20. The decoded video data (HDR′ data 316in the target color container) is then forwarded to video postprocessor31. Inverse quantization unit 314 performs an inverse quantizationprocess on HDR′ data 316 to reverse the quantization process performedby quantization unit 214 of FIG. 8.

Video decoder 30 may also be configured to decode and send any of theone or more syntax elements produced by DRA parameters estimation unit212 of FIG. 10 to DRA parameters derivation unit 312 of videopostprocessor 31. DRA parameters derivation unit 312 may be configuredto determine the DRA parameters based on one or more syntax elements orSEI messages, in accordance with one or more aspects of the presentdisclosure. In some examples, the one or more syntax elements or SEImessages may indicate the DRA parameters explicitly. In other examples,DRA parameters derivation unit 312 is configured to derive some (or all)of the DRA parameters using information from syntax elements or SEImessages, and/or using the same techniques used by DRA parametersestimation unit 212 of FIG. 10.

The parameters derived by DRA parameters derivation unit 312 may be sentto inverse adjustment unit 310. Inverse adjustment unit 310 uses the DRAparameters to perform the inverse of the linear DRA adjustment performedby adjustment unit 210. Inverse adjustment unit 310 may apply theinverse of any of the adjustment techniques described above foradjustment unit 210. In addition, as with adjustment unit 210, inverseadjustment unit 310 may apply the inverse DRA before or after anyinverse color conversion. As such, inverse adjustment unit 310 may applythe DRA parameter on the video data in the target color representationor the native color representation. In some examples, the inverseadjustment unit may also be applied before the inverse quantizationunit.

Inverse color conversion unit 308 converts the video data from thetarget color space (e.g., YCbCr) to the native color space (e.g., RGB).Inverse transfer function 306 then applies an inverse of the transferfunction applied by transfer function 206 to uncompact the dynamic rangeof the video data. The resulting video data (RGB target CG 304) is stillrepresented using the target primaries, but is now in the native dynamicrange and native color space. Next, inverse CG converter 302 convertsRGB target CG 304 to the native color gamut to reconstruct RGB native CG300.

In some examples, additional postprocessing techniques may be employedby video postprocessor 31. Applying the DRA may put the video outsideits actual native color gamut. The quantization steps performed byquantization unit 214 and inverse quantization unit 314, as well as theup and down-sampling techniques performed by adjustment unit 210 andinverse adjustment unit 310, may contribute to the resultant colorvalues in the native color representation being outside the native colorgamut. When the native color gamut is known (or the actual smallestcontent primaries, if signaled, as described above), then additionalprocess can be applied to RGB native CG video data 304 to transformcolor values (e.g., RGB or Cb and Cr) back into the intended gamut aspostprocessing for DRA. In other examples, such postprocessing may beapplied after the quantization or after DRA application.

According to one or more aspects of the present disclosure, and asfurther described below, video decoder 30 may receive one or more SEImessages that indicate parameters and/or information that relate to thedynamic range adjustment performed by video preprocessor 19. Videodecoder 30 may parse and/or decode the information, and act upon itand/or pass that information to video postprocessor 31. Such SEImessages may include information sufficient to enable video decoder 30and/or video postprocessor 31 to perform the inverse of the dynamicrange adjustment to reconstruct the video data.

In addition to deriving DRA parameters or DRA adjustment information,video preprocessor 19 (e.g., DRA parameters estimation unit 212) orvideo encoder 20 of FIG. 8 may be configured to signal the DRAparameters in an encoded bitstream or by other means such as a differentchannel. DRA parameters derivation unit 312 or video decoder 30 of FIG.10 may be configured to receive such signaling in the encoded bitstreamor from other means such as a different channel. DRA parametersestimation unit 212 may signal one or more syntax elements that indicatethe DRA parameters directly, or may be configured to provide the one ormore syntax elements to video encoder 20 for signaling. Such syntaxelements of the parameters may be signaled in the bitstream such thatvideo decoder 30 and/or video postprocessor 31 may perform the inverseof the process of video preprocessor 19 to reconstruct the video data inits native color representation.

One way in which video encoder 20 or video preprocessor 19 may signalthe DRA adjustment parameters or DRA adjustment information is throughan SEI message. Supplemental Enhancement Information (SEI) messages havebeen used for a number of purposes and may be included in videobitstreams, typically to carry information that are not essential inorder to decode the bitstream by the decoder. This information may beuseful in improving the display or processing of the decoded output;e.g., such information could be used by decoder-side entities to improvethe viewability of the content. It is also possible that certainapplication standards could mandate the presence of such SEI messages inthe bitstream so that the improvement in quality can be brought to alldevices that conform to the application standard (the carriage of theframe-packing SEI message for frame-compatible plano-stereoscopic 3DTVvideo format, where the SEI message is carried for every frame of thevideo, e.g., as described in ETSI-TS 101 547-2, Digital VideoBroadcasting (DVB) Plano-stereoscopic 3DTV; Part 2: Frame compatibleplano-stereoscopic 3DTV, handling of recovery point SEI message, e.g.,as described in 3GPP TS 26.114 v13.0.0, 3rd Generation PartnershipProject; Technical Specification Group Services and System Aspects; IPMultimedia Subsystem (IMS); Multimedia Telephony; Media handling andinteraction (Release 13), or use of pan-scan scan rectangle SEI messagein DVB, e.g., as described in ETSI-TS 101 154, Digital VideoBroadcasting (DVB); Specification for the use of Video and Audio Codingin Broadcasting Applications based on the MPEG-2 Transport Stream.

A number of SEI messages that have been used may be deficient in one ormore ways for signaling dynamic range adjustment parameters inaccordance with one or more aspects of the present disclosure.

For example, one SEI message is a tone-mapping information SEI message,which is used to map luma samples, or each of RGB component samples.Different values of tone_map_id are used to define different purposes,and the syntax of the tone-map SEI message is also modified accordingly.For example, a value of 1 for the tone_map_id allows a processor actingon the SEI message to clip the RGB samples to a minimum and a maximumvalue. A value of 3 for the tone_map_id allows or indicates that alook-up table will be signaled in the form of pivot points. However,when applied, the same values are applied to all RGB components, or onlyapplied to the luma component.

Another example is the knee function SEI message, which is used toindicate the mapping of the RGB components of the decoded pictures inthe normalized linear domain. The input and output maximum luminancevalues are also indicated, and a look-up table maps the input luminancevalues to the output luminance values. The same look-up table may beapplied to all the three color components.

The color remapping information (CRI) SEI message, which is defined inthe HEVC standard, is used to convey information that is used to mappictures in one color space to another. FIG. 11 shows a typicalstructure of the color remapping information process used by the CRI SEImessage. In one example, the syntax of the CRI SEI message includesthree parts: a first look-up table (Pre-LUT) 1302, followed by a 3×3matrix indicating color remapping coefficients 1304, and followed by asecond look-up table (Post-LUT) 1306. For each color component, e.g.,R,G,B or Y,Cb,Cr, an independent Pre-LUT is defined, and also anindependent Post-LUT is defined. The CRI SEI message also includes asyntax element called colour_remap_id, different values of which may beused to indicate different purposes of the SEI message.

In another example, the dynamic range adjustment (DRA) SEI message, hasbeen described in D. Bugdayci Sansli, A. K. Ramasubramonian, D.Rusanovskyy, S. Lee, J. Sole, M. Karczewicz, Dynamic range adjustmentSEI message, m36330, MPEG meeting, Warsaw, Poland, 22-26 Jun. 2015. Anexample DRA SEI message includes signaling of one set of scale andoffset numbers to map the input samples. The SEI message also allows thesignaling of different look-up tables for different components, and alsoallows for signaling optimization when the same scale and offset are tobe used for more than one component. The scale and offset numbers may besignaled in fixed length accuracy.

This section lists several problems that are associated with the colorremapping information SEI message and other SEI messages related toscaling or mapping video content. The SEI messages described in theprevious paragraphs have one or more of the following deficiencies:

There are several problems associated with the tone-mapping SEI message,the knee function SEI message, and the CRI SEI message. For example, thetone-mapping information SEI syntax does not allow indication, orprovide any indication, of scaling for chroma components Cb and Cr.Further the number of bits needed to indicate the look-up table pivotpoints and other syntax elements (e.g., in the CRI SEI message) is morethan what may be necessary, and may be inefficient. When the SEI messageis to be signaled more frequently, e.g. every frame, it may bebeneficial that the SEI message be simple and consume fewer bits.Further, many SEI messages (e.g., tone-mapping information, kneefunction SEI message) have same look up table applied for all threecolor components when applicable. Still further, the dynamic rangeadjustment SEI message only signals one scale and one offset for eachcomponent.

In view of the foregoing, and as further described below, thisdisclosure proposes signaling, through one or more new SEI messages,parameters and/or information relating to performing dynamic rangeadjustment described above. The dynamic range adjustment parameters orinformation may be used by the video decoder 30 and/or videopostprocessor 31 to perform the inverse of the dynamic range adjustmentto reconstruct the video data. In some examples, the DRA parameters orDRA information may be signaled explicitly. For example, the one or moreSEI messages may include the various global offset, local offset,partition, and scale information.

Accordingly, in some examples, video encoder 20 may receive dynamicrange adjustment parameters or information from video preprocessor 19,and may signal one or more SEI messages that include various dynamicrange adjustment parameters or dynamic range adjustment information.Such information may include global offset, local offset, partition, andscale parameters, or information that is sufficient to derive suchparameters or information, or is otherwise sufficient to describe howthe dynamic range adjustment was applied to the video data. Decoder 30may receive one or more of such SEI messages, parse and/or decode theinformation in the SEI messages, and act upon such information and/orpass the information to the video postprocessor 31.

In some examples, video encoder 20 may signal one or more SEI messagesthat include global offset values, including, for each component, afirst offset value that determines a first unadjusted component valuebelow which all component values are clipped to the first componentvalue before applying dynamic range adjustment as described in thisdisclosure. Decoder 30 may receive one or more of such SEI messages,parse and/or decode the information in the SEI messages, and pass theinformation to the video postprocessor 31.

In some examples, for each component, video encoder 20 may signal one ormore SEI messages that include a second offset value that specifies theadjusted value to which the first offset value maps to after dynamicrange adjustment. Video decoder 30 may receive such SEI messages, parseand/or decode the information, and pass that information to videopostprocessor 31.

In another example, neither the first global offset value nor the secondglobal offset value is signaled in a SEI message. Instead, decoder 30assumes that the values of the first global offset and the second globaloffset is a constant, predetermined, or signaled value that the decoder30 either determines per sequence or receives by external means. Inanother example, video encoder 20 signals the first global offset valuein an SEI message, but the second global offset value is not signaled ina SEI message. Instead, video decoder 30 infers that its value is aconstant, predetermined, or signaled value that decoder 30 eitherdetermines per sequence or received by external means. In a stillfurther example, video encoder 20 signals the second global offset valuein an SEI message, but the first global offset value is not signaled ina SEI message. Instead, video decoder 30 infers that the first globaloffset value is a constant, predetermined, or signaled value thatdecoder 30 either determines per sequence or received by external means.

In some examples, video encoder 20 may signal offset values that arereceived by decoder 30, and are used by decoder 30 to derive otherglobal or local parameters, including both global and local scale andoffset values, as well as partitions of a range of unadjusted values,and partitions of a range of adjusted values.

In some examples, video encoder 20 may signal one or more SEI messagesthat include the number of partitions that the range of inputrepresentation values (i.e., component values) were divided into duringdynamic range adjustment. In one example, the number of partitions maybe constrained to be a power of 2 (i.e. 1, 2, 4, 8, 16, etc.) and thenumber of partitions is signaled as logarithm (e.g. 8 partitions issignaled as 3=log₂ 8). Video decoder 30 may receive such SEI messages,parse and/or decode the information, and pass that information to videopostprocessor 31.

In some examples, the number of partitions for the chroma components maybe different from the number of partitions for the luma component. Thenumber of partitions may be constrained to be a power of 2+1 andsignaled as logarithm and rounding towards minus 0. In this way, pixelswith neutral chroma can have their own values and the size of thatpartition can be smaller than the other partitions. In such an example,neutral chroma may refer to values of chroma around the mid-value (e.g.,0 when the chroma values range between −0.5 and 0.5, or between −512 and511 in a 10-bit representation). Constraining the number of partitionsas a power of 2 may enable the encoder 20 to save bits, because encoder20 may be able to represent the log of a value with fewer bits than theactual value for integer values. Constraining the number of partitionsto a power of 2+1 may ensure that at least one partition may bededicated to the neutral chroma values, and in some examples, the widthof the partition corresponding to the neutral chroma values may besmaller than the rest. In other examples, such a partition may be largerthan one or more of the other partitions.

In some examples, decoder 30 may use the signaled number of partitionsto derive other global or local parameters, including both global andlocal scale and offset values, as well as the actual size of thepartitions of a range of unadjusted component values and/or the size ofthe partitions of a range of adjusted component values.

In some examples, encoder 20 may signal one or more SEI messages thatmay include, for each partition, a local scale and local offset valuespecifying a range of the input component values and the correspondingmapped output component values. In some examples, encoder 20 may signalan SEI message that includes the number of bits used by the syntaxelements to signal the scale and offsets. In other examples, encoder 20may signal an SEI message that indicates the number of bits that areused to represent the fractional part of the scale and offsets in thesyntax elements. In other examples, encoder 20 may signal one or moreSEI messages or syntax elements that indicate that the integer part ofthe scale parameters is signaled in a signed representation. In someexamples, the signed representation is two's complement. In otherexamples, the signed representation is signed magnitude representation.Video decoder 30 may receive such SEI messages and/or syntax elements,parse and/or decode the information, and pass that information to videopostprocessor 31.

In other examples, encoder 20 may use each offset value successively tofirst compute the range of adjusted component or representation values,and then using the scale value, compute the corresponding range in theunadjusted representation. For example, one offset value may be used tocompute the range of a first partition in the adjusted component usingthe value of a global offset value derived or signaled for the adjustedcomponent, followed by using the scale value and the range of a firstpartition of the adjusted representation to derive the range in thecorresponding partition of the unadjusted representation and with therespective ranges of the first partition of the adjusted and thecorresponding partition of the unadjusted representations, derive arespective value derived for the first partition of the adjusted rangeand the corresponding partition of unadjusted representations thatindicate a boundary of the partitions. Following this, another offsetvalue may be used to compute the range of a second partition in theadjusted component using the boundary value of the first partition inthe adjusted component derived in the previous step, followed by usingthe scale value and the range of a second partition of the adjustedrepresentation to derive the range of the unadjusted representation, andwith the respective ranges of the second partitions of the adjustedrepresentation and corresponding partition of the unadjustedrepresentations, a respective value is derived for the partitions in theadjusted and unadjusted representations that indicate a boundary of therespective representations. This method may be repeated until all theranges and boundaries are derived for all the partitions in the adjustedand unadjusted representations. In another example, encoder 20 may useeach offset value successively to first compute the range of unadjustedcomponent or representation values, and then using the scale value,compute the corresponding range in the adjusted representation. In otherwords, the component or representation to which the scale and offsetvalues are applied could be swapped between unadjusted and adjustedrepresentations.

In some examples, the number of bits used by the syntax elements tosignal scale and offset values may depend on the component. In otherexamples, a default number of bits is defined and used when thesenumbers are not explicitly signaled.

In some examples, encoder 20 may signal a syntax element indicatingwhether the length of the partitions of the output representations(i.e., output components) are equal. In such an example, encoder 20might not signal the offset value for one or more partitions. Decoder 30may infer the offset values to be equal in some examples. In anotherexample, decoder 30 may assume the partitions are of equal length andmay not receive a syntax element so indicating. In some examples,decoder 30 may derive the size of each partition from signaled syntaxelements and predefined total dynamical range of the representation.

In other examples, rather than signaling pivot points for each partitionas well as scale and offset values for each partition, video encoder 20may signal one or more SEI messages that indicate derivative or scalevalue for each partition along with the size of one or more or allpartitions. This approach may allow encoder 20 to avoid signaling localoffset values for each partition. Instead, in some examples, encoder 20may be able to signal, in one or more SEI messages, the partition sizeand scale value (or derivative) for one or more partitions. The localoffset value for each partition or partitioning (which may requirehigher accuracy) may be determined or derived by decoder 30.

In some examples, encoder 20 may signal one or more SEI messages thatindicate a mode value that specifies several default values for offsetand scale values for certain partitions. Video decoder 30 may receivesuch SEI messages, parse and/or decode the information, and pass thatinformation to video postprocessor 31.

In some examples, encoder 20 may signal one or more SEI messages thatindicate a value defining the persistence of the SEI message such thatthe persistence of a subset of the components may be defined andcomponent scale values of a subset of the components may be updated. Thepersistence of an SEI message indicates the pictures to which the valuessignaled in the instance of the SEI may apply. In some examples, thepersistence of the SEI message is defined such that the values signaledin one instance of SEI messages may apply correspondingly to the allcomponents of the pictures to which the SEI message applies. In otherexamples, the persistence of the SEI message is defined such that thevalues signaled in one instance of the SEI may be indicated to applycorrespondingly to a subset of the components wherein the components towhich the values in the instance of the SEI does not apply may eitherhave no values applicable or may have values applicable that aresignaled in another instance of the SEI message. Video decoder 30 mayreceive such SEI messages, parse and/or decode the information, and passthat information to video postprocessor 31.

In some examples, encoder 20 may signal one or more SEI messages thatinclude syntax elements indicating the postprocessing steps to beperformed to the decoded output. Each syntax element may be associatedwith a particular process (e.g. scaling components, color transforms,up-sampling/down-sampling filters, etc.) and each value of the syntaxelement may specify that a particular set of parameters associated withthe process be used. In some examples, the parameters associated withthe process are signaled by video encoder 20 using SEI messages that arepart of the bitstream or as metadata that may be transmitted throughother means. Video decoder 30 may receive such SEI messages, parseand/or decode the information, and pass that information to videopostprocessor 31.

In some examples, encoder 20 may signal syntax elements or one or moreSEI messages that may be used for describing and/or constructing apiece-wise linear model function for mapping input representations(i.e., input component values) to output representations (i.e., outputcomponent values). Video decoder 30 may receive such SEI messages, parseand/or decode the information, and pass that information to videopostprocessor 31. In other examples, predefined assumptions may be usedfor describing and/or constructing a piece-wise linear model functionfor mapping input representations to the output representation.

In some examples, encoder 20 may signal one or more SEI messages thatmay include one or more syntax elements indicating that the scale andoffset parameters signaled in the SEI message represent the variation ofthe scale to be applied to a first component as a function of differentvalues of a second component.

In some examples, encoder 20 may signal one or more SEI messagesindicating offset parameters that are to be or may be applied along withthe scale on a first component as a function of different values of asecond component. In some examples, encoder 20 may signal one or moreSEI messages that may include one or more additional syntax elementsthat indicating offset parameters that are to be or may be applied alongwith the scale on a first component as a function of different values ofa second component. Video decoder 30 may receive such SEI messages,parse and/or decode the information, and pass that information to videopostprocessor 31.

In some examples, encoder 20 may signal one or more SEI messagesincluding a first syntax element that indicates a first set ofelectro-optical transfer function characteristics such that the signaledscale, offset and other dynamic range adjustment parameters the SEImessage are applied when the electro-optical transfer functioncharacteristics used on the decoder-side are similar to that first setof electro-optical transfer function characteristics.

In another example, encoder 20 may signal one or more SEI messagesindicating that the signaled offset, scale and other dynamic rangeparameters in the SEI message(s) are to be applied for bestreconstruction of the HDR output when the first set of electro-opticaltransfer function characteristics, or those with similarcharacteristics, are used by the decoder 30. Video decoder 30 mayreceive such SEI messages, parse and/or decode the information, and passthat information to video postprocessor 31.

In another example, encoder 20 may signal one or more SEI messagesindicating that a first set of opto-electronic transfer functioncharacteristics, and the signaled scale, offset and other dynamic rangeadjustment parameters are applied on by decoder 30 when thecorresponding inverse electro-optical transfer function characteristicsare applied at the decoder side. Video decoder 30 may receive such SEImessages, parse and/or decode the information, and pass that informationto video postprocessor 31.

In other examples, encoder 20 may signal a condition such that when morethan one SEI message is present indicating different set ofelectro-optical/opto-electronic characteristics and applicable thecurrent picture, only one SEI message is applied. The encoder may signaldifferent set of electro-optical/opto-electronic characteristics tosatisfy different types of decoders, or decoders with differentcapabilities. For example, some displays at the decoder side may applythe PT EOTF to convert the coded component values in an appropriatedomain to linear light, whereas other displays, e.g. legacy displays,may apply the gamma EOTF to convert to linear light. Each SEI with aparticular characteristic that the encoder sends may be appropriate orbeneficial for certain types of displays and not for other types ofdisplays, e.g. an SEI message with PQ EOTF characteristics may besuitable for displays that apply PQ EOTF to convert the coded video tolinear light. The decoder 30 determines which SEI message is to beapplied, and makes such a choice based on the application standard,based on the end-user device, based on a signal received, or based onanother indication received through external means. For example, decoder30 may determine that the first syntax element in a first SEI messagethat applies to a current picture indicates that the SEI message is tobe applied with the inverse of PQ OETF and the first syntax element in asecond SEI message that applies to a current picture indicates that theSEI message is to be applied with another transfer function (such asBBC, or PH), the decoder 30 or end-user device may choose to apply theparameters in the first SEI message because the device uses PQ EOTF. Insome examples, an application standard to which the decoder conforms tomay specify that an SEI message with a particular set of characteristicsis to be used.

In other examples, encoder 20 may signal an SEI message that carries theparameters corresponding to multiple sets of transfer characteristics.In other examples, encoder 20 may signal different SEI messages for thatpurpose. Video decoder 30 may receive such SEI messages, parse and/ordecode the information, and pass that information to video postprocessor31

In some examples, encoder 20 may signal one or more SEI messages thatinclude a syntax element indicating the applicability of the SEImessage. The applicability of the SEI message may include, but is notlimited to (1) the components to which the scales and offsets apply, (2)the position at which the component scaling is applied, and/or (3)whether additional scaling parameters are signaled.

As described, encoder 20 may signal one or more SEI messages thatinclude a syntax element indicating the components to which the scalesand offsets apply. The following lists several examples of such anapplication. For example, one value of the syntax element could indicatethat signaled parameters for the first component index are to be appliedto the RGB components. Another value may indicate that the signaledparameters for the first component index is to be applied to lumacomponent, and those for the second and third indices are to be appliedto the Cb and Cr components. Another value may indicate that thesignaled parameters for the first component index is to be applied to R,G and B components, and those for the second and third indices are to beapplied to the Cb and Cr components. Another value may indicate thatsignaled parameters for first three indices are applied to luma, Cb andCr components, and that corresponding to the remaining indices areapplied for color correction. Video decoder 30 may receive such SEImessages, parse and/or decode the information, and pass that informationto video postprocessor 31.

Also as described, encoder 20 may signal one or more SEI messagesincluding a syntax element indicating the position at which thecomponent scaling is applied. Several processes occur on thedecoder-side, after decoding of the video, and in the videopostprocessor 31. Signaling of syntax element indicating the position atwhich the process associated with the SEI is to be applied, in otherwords indication of any subset of the preceding or succeeding operationsof the process associated with using the information in the SEI, wouldbe helpful to the video decoder 30 or the video postprocessor 31 toprocess the video. For example, such a syntax element could indicate theposition at which the component scaling is applied, for example to YCbCrcomponents before or after upsampling. In another example, the syntaxelement could indicate that the component scaling is applied before thequantization to the decoder side. Video decoder 30 may receive such SEImessages, parse and/or decode the information, and pass that informationto video postprocessor 31.

Also as described, encoder 20 may signal one or more SEI messages thatinclude a syntax element indicating whether an additional set of scalingand parameters, e.g. for color correction, are signaled. The additionalset of parameters could be used for color correction to map the colorcomponents to fit a particular color gamut, or for correction ofcomponent values when a different transfer function is applied than thatindicated by the transfer_characteristics syntax element in the VUI.

In other examples, encoder 20 may signal different syntax elements toindicate the above aspects; e.g. one syntax element to indicate whichcomponent(s) the SEI applies to, one syntax element to indicate whetherit applies to HDR-compatible of SDR-compatible content, and one syntaxelement to indicate the position(s) where the component scaling SEImessage is to be applied.

When the number of components to which the component scaling SEI messageparameters are applied is more than one, encoder 20 may signal one ormore SEI messages that include a syntax element indicating thatapplication of scale and offset parameters may be done sequentiallybased on the index of the component. For example, the mapping based onthe scale and offset parameters of the first component may be applied,and then the mapping of the second component, which for example usesscale and offset signaled for the second component, may depend on thevalues of the first component. In some examples, this is indicated by,for example, by syntax element specifying that the mapped values of thefirst component should be used. Video decoder 30 may receive such SEImessages, parse and/or decode the information, and pass that informationto video postprocessor 31.

In another example, video encoder 20 may constrain the values signaledin one or more SEI messages, or in the bitstream, in such a way that anHDR10 receiver can decode and show a viewable HDR video even if the SEIpostprocessing is not applied. The SEI message(s) may include a syntaxelement to indicate that this is the case (e.g., that the bitstream isan HDR10 backward compatible bitstream).

This section includes several examples that use techniques disclosed inaccordance with one or more aspects of the present disclosure.

Example 1

In this example 1, the component scaling function is signaled as alook-up table and the number of bits used to signal the points definingthe look up table are also signaled. For sample values that do not haveexplicit points signaled, the value is interpolated based on theneighboring pivot points.

Syntax of the Component Scaling SEI Message

Descrip- tor component_scale_info( payloadSize ) {  comp_scale_id ue(v) comp_scale_cancel_flag u(1)  if( !comp_scale_cancel_flag ) {comp_scale_persistence_flag u(1) comp_scale_num_comps_minus1 ue(v)comp_scale_input_bit_depth ue(v) comp_scale_output_bit_depth ue(v) for(c = 0; c <= comp_scale_num_comps_minus1; c++ ) { comp_scale_num_points_minus1[ c ] ue(v)  for( i = 0; i <=comp_scale_num_points_minus1[   c ]; i++ ) { comp_scale_input_point[ c][ i ] u(v) comp_scale_output_point[ c ][ i ] u(v)  } }  } }Semantics of the Component Scaling SEI Message

The component scaling SEI message provides information to performscaling operations on the various components of the decoded pictures.The colour space and the components on which the scaling operationsshould be performed are determined by the value of the syntax elementssignalled in the SEI message.

comp_scale_id contains an identifying number that may be used toidentify the purpose of the component scaling SEI message. The value ofcomp_scale_id shall be in the range of 0 to 2³²−2, inclusive. The valueof comp_scale_id may be used to specify the colour space at which thecomponent scaling SEI message, or whether the component scaling SEImessage is applied in the linear or the non-linear domain.

Values of comp_scale_id from 0 to 255, inclusive, and from 512 to 2³¹−1,inclusive, may be used as determined by the application. Values ofcomp_scale_id from 256 to 511, inclusive, and from 2³¹ to 2³²−2,inclusive, are reserved for future use by ITU-T ISO/IEC. Decoders shallignore all component scale information SEI messages containing a valueof comp_scale_id in the range of 256 to 511, inclusive, or in the rangeof 2³¹ to 2³²−2, inclusive, and bitstreams shall not contain suchvalues.

-   -   NOTE 1—The comp_scale_id can be used to support component        scaling processes that are suitable for different display        scenarios. For example, different values of comp_scale_id may        correspond to different display bit depths or different colour        spaces in which the scaling is applied.

Alternatively, the comp_scale_id may also be used to identify whetherthe scaling is performed for compatibility to certain types of displaysor decoder, e.g. HDR, SDR.

comp_scale_cancel_flag equal to 1 indicates that the component scalinginformation SEI message cancels the persistence of any previouscomponent information SEI messages in output order that applies to thecurrent layer. comp_scale_cancel_flag equal to 0 indicates thatcomponent scaling information follows.

comp_scale_persistence_flag specifies the persistence of the componentscaling information SEI message for the current layer.

comp_scale_persistence_flag_equal to 0 specifies that the componentscaling information applies to the current decoded picture only.

Let picA be the current picture. comp_scale_persistence_flag_equal to 1specifies that the component scaling information persists for thecurrent layer in output order until any of the following conditions aretrue:

-   -   A new CLVS of the current layer begins.    -   The bitstream ends.    -   A picture picB in the current layer in an access unit containing        a component scaling information SEI message with the same value        of comp_scale_id and applicable to the current layer is output        for which PicOrderCnt(picB) is greater than PicOrderCnt(picA),        where PicOrderCnt(picB) and PicOrderCnt(picA) are the        PicOrderCntVal values of picB and picA, respectively,        immediately after the invocation of the decoding process for        picture order count for picB.

comp_scale_num_comps_minus1 plus 1 specifies the number of componentsfor which the component scaling function is specified.comp_scale_num_comps_minus1 shall be in the range of 0 to 2, inclusive.

When comp_scale_num_comps_minus1 is less than 2 and the componentscaling parameters of the c-th component is not signalled, are inferredto be equal to those of the (c−1)-th component.

Alternatively, when comp_scale_num_comps_minus1 is less than 2, and thecomponent scaling parameters of the c-th component is not signalled, thecomponent scaling parameters of the c-th component are inferred to beequal to default values such that effectively there is no scaling ofthat component.

Alternatively, the inference of the component scaling parameters may bespecified based on the colour space on which the SEI message is applied.

-   -   When the colour space is YCbCr, and comp_scale_num_comps_minus1        is equal to 1, the component scaling parameters apply to both Cb        and Cr components.    -   When the colour space is YCbCr, and comp_scale_num_comps_minus1        is equal to 2, the first and second component scaling parameters        apply to Cb and Cr components.

In one alternative, the different inference is specified based on thevalue of comp_scale_id or on the basis of an explicit syntax element.

Alternatively, a constraint is added as follows:

-   -   It is constraint for bitstream conformance that the value of        comp_scale_num_comps_minus1 shall be the same for all the        component scaling SEI message with a given value of        comp_scale_id within a CLVS.

comp_scale_input_bit_depth_minus8 plus 8 specifies the number of bitsused to signal the syntax element comp_scale_input_point[c][i]. Thevalue of comp_scale_input_bit_depth_minus8 shall be in the range of 0 to8, inclusive.

When component scaling SEI message is applied to an input that is in anormalized floating point representation in the range 0.0 to 1.0, theSEI message refers to the hypothetical result of a quantizationoperation performed to convert the input video to a converted videorepresentation with bit depth equal tocolour_remap_input_bit_depth_minus8+8.

When component scaling SEI message is applied to a input that has a bitdepth not equal to the comp_scale_input_bit_depth_minus8+8, the SEImessage refers to the hypothetical result of a transcoding operationperformed to convert the input video representation to a converted videorepresentation with bit depth equal tocolour_remap_input_bit_depth_minus8+8.

comp_scale_output_bit_depth_minus8 plus 8 specifies the number of bitsused to signal the syntax element comp_scale_output_point[c][i]. Thevalue of comp_scale_output_bit_depth_minus8 shall be in the range of 0to 8, inclusive.

When component scaling SEI message is applied to an input that is infloating point representation, the SEI message refers to thehypothetical result of an inverse quantization operation performed toconvert the video representation with a bit depth equal tocolour_remap_output_bit_depth_minus8+8 that is obtained after processingof the component scaling SEI message to a floating point representationin the range 0.0 to 1.0. Alternatively, the number of bits used tosignal comp_scale_input_point[c][i] and comp_scale_output_point[c][i]are signalled as comp_scale_input_bit_depth andcomp_scale_output_bit_depth, respectively, or in other words withoutsubtracting 8.

comp_scale_num_points_minus1[c] plus 1 specifies the number of pivotpoints used to define the component scaling function.comp_scale_num_points_minus1[c] shall be in the range of 0 to(1<<Min(comp_scale_input_bit_depth_minus8+8,comp_scale_output_bit_depth_minus8+8))−1, inclusive.

comp_scale_input_point[c][i] specifies the i-th pivot point of the c-thcomponent of the input picture. The value ofcomp_scale_input_point[c][i] shall be in the range of 0 to(1<<comp_scale_input_bit_depth_minus8[c]+8)−1, inclusive. The value ofcomp_scale_input_point[c][i] shall be greater than or equal to the valueof comp_scale_input_point[c][i−1], for i in the range of 1 tocomp_scale_points_minus1[c], inclusive.

comp_scale_output_point[c][i] specifies the i-th pivot point of the c-thcomponent of the output picture. The value ofcomp_scale_output_point[c][i] shall be in the range of 1 to(1<<comp_scale_output_bit_depth_minus8[c]+8)−1, inclusive. The value ofcomp_scale_output_point[c][i] shall be greater than or equal to thevalue of comp_scale_output_point[c][i−1], for i in the range of 1 tocomp_scale_points_minus1[c], inclusive.

The process of mapping an input signal representation x and an outputsignal representation y, where the sample values for both input andoutput are in the range of 0 to(1<<comp_scale_input_bit_depth_minus8[c]+8)−1, inclusive, and 0 to(1<<comp_scale_output_bit_depth_minus8[c]+8)−1, inclusive, respectively,is specified as follows:

if( x <= comp_scale_input_point[ c ][ 0 ] ) y = comp_scale_output_point[c ][ 0 ] else if( x > comp_scale_input_point[ c ][comp_scale_input_point_minus1[ c ] ] ) y = comp_scale_output_point[ c ][comp_scale_output_point_minus1[ c ] ] else for( i = 1; i <=comp_scale_output_point_minus1 [ c ]; i++ ) if( comp_scale_input_point[i − 1 ] < x && x <= comp_scale_input_point[ i ] ) y = ( (comp_scale_output_point[ c ][ i ] − comp_scale_output_point[ c ][ i − 1] ) ÷ ( comp_scale_input_point[ c ][ i ] − comp_scale_input_point[ c ][i − 1 ] ) ) * ( x − comp_scale_input_point[ c ][ i − 1 ] ) +  (comp_scale_output_point[ c ][ i − 1 ] )

In one alternative, input and output pivot pointscomp_scale_input_point[c][i] and comp_scale_output_point[c][i] are codedas difference of adjacent values; e.g., delta_comp_scale_input_point[ ][] and delta_comp_scale_output_point[ ][ ], and the syntax elements arecoded using exponential Golomb codes.

In another alternative, the process of mapping an input and outputrepresentation value is specified by other interpolation methodsincluding, but not limited to, splines and cubic interpolation.

Example 2

This Example 2 shows a different syntax structure compared to the SEIsyntax structure described in Example 1. In this syntax structure, themapping function is described in terms of scales and offsets instead ofpivot points.

Syntax of the component scaling SEI message

Descrip- tor component_scale_info( payloadSize ) {  comp_scale_id ue(v) comp_scale_cancel_flag u(1)  if( !comp_scale_cancel_flag ) {comp_scale_persistence_flag u(1) comp_scale_num_comps ue(v)comp_scale_input_bit_depth ue(v) comp_scale_output_bit_depth ue(v)comp_scale_bit_depth_scale_val ue(v) comp_scale_log2_denom_scale_value(v) for( c = 0; c < comp_scale_num_comps; c++ ) { comp_scale_num_points_minus1[ c ] ue(v) comp_scale_global_offset_input_val[ c ] u(v) comp_scale_global_offset_output_val[ c ] u(v)  for( i = 0; i < comp_scale_num_points_minus1[ c ]; i++ ) { comp_scale_offset_val[ c ][i ] u(v) comp_scale_val[ c ][ i ] u(v)  } }  } }

comp_scale_bit_depth_scale_val specifies the number of bits used tosignal the syntax element comp_scale_val[c][i]. The value ofcomp_scale_bit_depth_scale_val shall be in the range of 0 to 24,inclusive.

comp_scale_log 2_denom_scale_val specifies the base 2 denominator of thescale value. The value of comp_scale_log2_denom_scale_val shall be inthe range of 0 to 16, inclusive.

comp_scale_global_offset_input_val[c] plus 1 specifies the input samplevalue below which all the input representation values are clipped toCompScaleOffsetOutputVal[c][0]. used to define the component scalingfunction. comp_scale_num_points_minus1[c] shall be in the range of 0 to(1<<comp_scale_input_bit_depth)−1, inclusive. The number of bits used torepresent comp_scale_global_offset_input_val[c] iscomp_scale_input_bit_depth.

comp_scale_global_offset_output_val[c] plus 1 specifies the outputsample value to which all the input representation values belowcomp_scale_global_offset_input_val[c] are to be clipped.comp_scale_num_points_minus1[c] shall be in the range of 0 to(1<<comp_scale_output_bit_depth)−1, inclusive. The number of bits usedto represent comp_scale_global_offset_output_val[c] iscomp_scale_output_bit_depth.

comp_scale_num_points_minus1[c] plus 1 specifies the number of pivotpoints used to define the component scaling function.comp_scale_num_points_minus1[c] shall be in the range of 0 to(1<<Min(comp_scale_input_bit_depth, comp_scale_output_bit_depth)−1,inclusive.

The process of mapping an input signal representation x and an outputsignal representation y, where the sample values for both inputrepresentation is in the range of 0 to(1<<comp_scale_input_bit_depth)−1, inclusive, and output representationis in the range of and 0 to (1<<comp_scale_output_bit_depth)−1,inclusive, is specified as follows:

if( x <= CompScaleOffsetInputVal[ c ][ 0 ] ) y =CompScaleOffsetOutputVal[ c ][ 0 ] else if( x > CompScaleOffsetInputVal[c ][ comp_scale_output_point_minus1 ] ) y = CompScaleOffsetOutputVal[ c][ comp_scale_output_point_minus1 ] else for( i = 1; i <=comp_scale_output_point_minus1; i++ ) if( CompScaleOffsetInputVal[ i − 1] < x && x <= CompScaleOffsetInputVal[ i ] ) y = ( x−CompScaleOffsetInputVal[ i − 1 ] ÷ ( comp_scale_val[ c ][ i ] +CompScaleOffsetOutputVal[ c ][ i ]

comp_scale_offset_val[c][i] specifies the offset value of the i-thsample value region of the c-th component. The number of bits used torepresent comp_scale_offset_val[c] is equal tocomp_scale_input_bit_depth.

comp_scale_val[c][i] specifies the scale value of the i-th sample valueregion point of the c-th component. The number of bits used to representcomp_scale_val[c] is equal to comp_scale_bit_depth_scale_val.

The variables CompScaleOffsetOutputVal[c][i] andCompScaleOffsetlnputVal[c][i] for i in the range of 0 tocomp_scale_num_points_minus1[c], inclusive, is derived as follows:

roundingOffset = (comp_scale_log2_denom_scale_val = = 0 ) ? 0 : (1 <<comp_scale_log2_denom_scale_val − 1) for( i = 0; i <=comp_scale_num_points_minus1 [ c ]; i++ )  if( i = = 0 )CompScaleOffsetOutputVal[ c ][ i ] =comp_scale_global_offset_output_val[ c ] CompScaleOffsetInputVal[ c ][ i] = comp_scale_global_offset_input_val[ c ]  elseCompScaleOffsetOutputVal[ c ][ i ] = CompScaleOffsetOutputVal[ c ][ i −1 ] + (comp_scale_offset_val[ c ][ i − 1 ] * comp_scale_val[ c ][ i − 1] + roundingOffset ) >> comp_scale_log2_denom_scal_evalCompScaleOffsetInputVal[ c ][ i ] = CompScaleOffsetInputVal[ c ][ i − 1] + comp_scale_offset_val[ c ][ i − 1 ]

In one alternative, comp_scale_offset_val[c][i] is used to directlycalculate CompScaleOffsetOutputVal[ ][i] and indirectly calculateCompScaleOffsetlnputVal[ ][i] for i in the range of 0 tocomp_scale_num_points_minus1[c] as follows:

for( i = 0; i < comp_scale_num_points_minus1[ c ]; i++ )  if( i = = 0 )CompScaleOffsetOutputVal[ c ][ i ] =comp_scale_global_offset_output_val[ c ] CompScaleOffsetInputVal[ c ][ i] = comp_scale_global_offset_input_val[ c ]  elseCompScaleOffsetInputVal[ c ][ i ] = CompScaleOffsetInputVal[ c ][ i − 1] + (comp_scale_offset_val[ c ][ i − 1 ] * comp_scale_val[ c ][ i − 1] + roundingOffset ) >> comp_scale_log2_denom_scale_val )CompScaleOffsetOutputVal[ c ][ i ] = CompScaleOffsetOutputVal[ c ][ i −1 ] + comp_scale_offset_val[ c ][ i − 1 ]

In one alternative, comp_scale_offset_val[c][i] for i in the range of 0to comp_scale_num_points_minus1[c], inclusive, are not signaled, and thevalues of comp_scale_offset_val[c][i] are derived based oncomp_scale_num_points_minus1[c] equally spaced intervals for which thescale is specified. The value of comp_scale_offset_val[c][i] for i inthe range of 0 to comp_scale_num_points_minus1[c]−1, inclusive, isderived as follows:

comp_scale_offset_val[ c ][ i ] = ( (1 << comp_scale_output_bit_depth )− comp_scale_global_offset_output_val[ c ] ) ÷comp_scale_num_points_minus1[ c ]

In another alternative, comp_scale_offset_val[c][i] for i in the rangeof 0 to comp_scale_num_points_minus1[c] is calculated as follows:

comp_scale_offset_val[ c ][ i ] = (1 << comp_scale_output_bit_depth ) ÷comp_scale_num_points_minus1[ c ] ÷

In one alternative, instead of signalingcomp_scale_num_points_minus1[c], the number of pivot points is signaledusing log 2_comp_scale_num_points[c], where (1<<log2_comp_scale_num_points[c]) specifies the number of pivot points for thec-th component.

Alternatively, each of comp_scale_offset_val[c][ ] andcomp_scale_val[c][ ] is signaled as floating point numbers, or as twosyntax elements with exponent and mantissa.

In another alternative, signaling of comp_scale_val[c][i] is replaced bycomp_scale_output_point[c][i].

The semantics of rest of the syntax elements are similar to thosedescribed in Example 1.

Example 3

This method described in Example 3 is similar to one of the alternativesdescribed in Example 2, with the exception that the component scalingfunctions are allowed to be updated independently.

Syntax of the Component Scaling SEI Message

Descrip- tor component_scale_info( payloadSize ) {  comp_scale_id ue(v) comp_scale_cancel_flag u(1)  if( !comp_scale_cancel_flag ) {comp_scale_persistence_flag u(1) comp_scale_num_comps ue(v)comp_scale_input_bit_depth ue(v) comp_scale_output_bit_depth ue(v) for(c = 0; c < comp_scale_num_comps; c++ ) { comp_scale_persist_component_flag[ c ] u(1)  if(!comp_scale_persist_component_flag[ c ] ) comp_scale_num_scale_regions[c ] ue(v) comp_scale_global_offset_input_val[ c ] u(v)comp_scale_global_offset_output_val[ c ] u(v) for( i = 0; i <comp_scale_num_scale_regions[ c ]; i++ ) {  comp_scale_offset_val[ c ][i ] u(v)  comp_scale_val[ c ][ i ] u(v) }  } }  } }Semantics of the Component Scaling SEI Message

The semantics is similar to Example 2, except for the following syntaxelements. comp_scale_num_scale_regions[c] specifies the number ofregions for which the syntax element comp_scale_val[c][i] is signalledfor the c-the component. comp_scale_num_scale_regions[c] shall be in therange of 0 to (1<<comp_scale_input_bit_depth)−1, inclusive.

comp_scale_persist_component_flag[c] equal to 0 specifies that componentscaling parameters for the c-th component are explicitly signalled inthe SEI message. comp_scale_persist_component_flag[c] equal to 1specifies that component scaling parameters for the c-th component arenot explicitly signalled in the SEI message, and it persists from thecomponent scaling parameters of the c-th component of the componentscaling SEI message that applies to previous picture, in output order.

It is a requirement of bitstream conformance that when the componentscaling SEI message is present in an TRAP access unit, the value ofcomp_scale_persist_component_flag[c], when present, shall be equal to 0.

Alternatively, the following condition is added:

It is a requirement of bitstream conformance that when the componentscaling SEI message is present in an access unit that is not an TRAPaccess unit and comp_scale_persist_component_flag[c] is equal to 1, thenthere is at least one picture that precedes the current picture inoutput order and succeeds, in output order, the previous TRAP picture indecoding order, inclusive, such that the one picture is associated witha component scaling SEI message with comp_scale_persistence_flag_equalto 1.

comp_scale_persistence_flag specifies the persistence of the componentscaling information SEI message for the current layer.comp_scale_persistence_flag equal to 0 specifies that the componentscaling information applies to the current decoded picture only.

Let picA be the current picture comp_scale_persistence_flag equal to 1specifies that the component scaling information of the c-th componentpersists for the current layer in output order until any of thefollowing conditions are true:

-   -   A new CLVS of the current layer begins.    -   The bitstream ends.    -   A picture picB in the current layer in an access unit containing        a component scaling information SEI message with the same value        of comp_scale_id and comp_scale_persist_component_flag[c] equal        to 0, and applicable to the current layer is output for which        PicOrderCnt(picB) is greater than PicOrderCnt(picA), where        PicOrderCnt(picB) and PicOrderCnt(picA) are the PicOrderCntVal        values of picB and picA, respectively, immediately after the        invocation of the decoding process for picture order count for        picB.

Example 4

In this Example 4, a different method to signal the scale regions isdisclosed.

Changes to Component Scaling SEI Message Syntax

Descrip- tor component_scale_info( payloadSize ) {  comp_scale_id ue(v) comp_scale_cancel_flag u(1)  if( !comp_scale_cancel_flag ) {comp_scale_persistence_flag u(1) comp_scale_num_comps ue(v)comp_scale_input_bit_depth ue(v) comp_scale_output_bit_depth ue(v) for(c = 0; c < comp_scale_num_comps; c++ ) { comp_scale_persist_component_flag[ c ] u(1)  if(!comp_scale_persist_component_flag[ c ] )comp_scale_global_offset_input_val[ c ] u(v)comp_scale_global_offset_output_val[ c ] u(v)comp_scale_num_scale_regions[ c ] ue(v) for( i = 0; i <comp_scale_num_scale_regions[ c ]; i++ ) {  comp_scale_offset_begin_val[c ][ i ] u(v)  comp_scale_offset_end_val[ c ][ i ] u(v)  comp_scale_val[c ][ i ] u(v) }  } }  } }Changes to Component Scaling SEI Message Semantics

The semantics of the syntax elements are similar to those described inprevious examples, except for the following:

comp_scale_offset_begin_val[c][i] specifies the beginning of the samplevalue range for which the scale value comp_scale_val[c][i] isapplicable. The number of bits used to representcomp_scale_offset_begin_val[c] is equal to comp_scale_input_bit_depth.

comp_scale_offset_end_val[c][i] specifies the end of the sample valuerange for which the scale value comp_scale_val[c][i] is applicable. Thenumber of bits used to represent comp_scale_offset_end_val[c] is equalto comp_scale_input_bit_depth. For regions that are not explicitlyspecified by comp_scale_offset_begin_val and comp_scale_offset_end_val,the comp_scale_value[c][i] for those regions is inferred to be equal to0.

Alternatively, comp_scale_offset_end_val[c][i] is not signaled andinstead the difference between comp_scale_offset_end_val[c][i] andcomp_scale_offset_begin_val[c][i] is signaled, and the value ofcomp_scale_offset_end_val[c][i] derived at the decoder-side.

In another alternative, the total number of regions in to which theoutput sample range is split is specified, and the number of regions issignaled for which the scale regions are explicitly signaled.

... u(v) comp_scale_global_offset_output_val[ c ] u(v)comp_scale_tot_scale_regions[ c ] ue(v) comp_scale_num_scale_regions[ c] ue(v) for( i = 0; i < comp_scale_num_scale_regions[ c ]; i++ ) {comp_scale_region_idx[ c ][ i ] u(v) comp_scale_val[ c ][ i ] u(v) } ...

comp_scale_tot_scale_regions[c] specifies the total number of equallength sample value ranges in to which the sample values are split. Thenumber of bits used to represent comp_scale_tot_scale_regions[c] isequal to comp_scale_input_bit_depth.

In one alternative, the comp_scale_tot_scale_regions[c] sample valueranges may not be exactly equal in length but very nearly equal toaccount for the integer accuracy of the region lengths.

comp_scale_region_idx[c][i] specifies the index of the sample valuerange for which the scale value comp_scale_val[c][i] is applied. Thelength of the syntax element comp_scale_region_idx[c] is Ceil(Log2(comp_scale_tot_scale_regions[c])) bits.

Alternatives

Alternatively, region around the chroma neutral (511 for 10-bit data)have smaller size, p.e., half the size of the other regions.

Example 5

Syntax of the Component Scale SEI Message

Descrip- tor component_scale_info( payloadSize ) {  comp_scale_id ue(v) comp_scale_cancel_flag u(1)  if( !comp_scale_cancel_flag) {comp_scale_persistence_flag u(1) comp_scale_scale_bit_depth u(4)comp_scale_offset_bit_depth u(4) comp_scale_scale_frac_bit_depth u(4)comp_scale_offset_frac_bit_depth u(4) comp_scale_num_comps_minus1 ue(v)for( c = 0; c <= comp_scale_num_comps_minus1; c++ ) { comp_scale_num_ranges[ c ] ue(v)  comp_scale_equal_ranges_flag[ c ]u(1)  comp_scale_global_offset_val[ c ] u(v)  for( i = 0; i <=comp_scale_num_ranges[ c ]; i++ ) comp_scale_scale_val[ c ][ i ] u(v) if( !comp_scale_equal_ranges[ c ]) u(v) for( i = 0; i <=comp_scale_num_ranges[ c ]; i++ )  comp_scale_offset_val[ c ][ i ] u(v) } }Semantics of the Component Scale SEI Message

The component scaling SEI message provides information to performscaling operations on the various components of the decoded pictures.The colour space and the components on which the scaling operationsshould be performed are determined by the value of the syntax elementssignalled in the SEI message.

comp_scale_id contains an identifying number that may be used toidentify the purpose of the component scaling SEI message. The value ofcomp_scale_id shall be in the range of 0 to 2³²−2, inclusive. The valueof comp_scale_id may be used to specify the colour space at which thecomponent scaling SEI message, or whether the component scaling SEImessage is applied in the linear or the non-linear domain.

In some examples, comp_scale_id can specify the configuration of the HDRreconstruction process. In some examples, particular value ofcomp_scale_id may be associated with signaling of scaling parameters for3 components. The scaling of the first components to be applied tosamples of R′,G′,B′ color space, and parameters of following 2components are applied for scaling of Cr and Cb.

For yet another comp_scale_id value, hdr reconstruction process canutilize parameters for 3 components, and scaling is applied to samplesof Luma, Cr and Cb color components.

In yet another comp_scale_id value, hdr reconstruction process canutilize signaling for 4 components, 3 of which to be applied to Luma, Crand Cb scaling, and 4th component to bring parameters of colorcorrection.

In some examples, certain range of comp_scale_id values may beassociated with HDR reconstruction conducted in SDR-backward compatibleconfiguration, whereas another range of comp_scale_id values may beassociated with HDR reconstruction conducted to non-backward compatibleconfiguration.

Values of comp_scale_id from 0 to 255, inclusive, and from 512 to 2³¹−1,inclusive, may be used as determined by the application. Values ofcomp_scale_id from 256 to 511, inclusive, and from 2³¹ to 2³²−2,inclusive, are reserved for future use by ITU-T ISO/IEC. Decoders shallignore all component scale information SEI messages containing a valueof comp_scale_id in the range of 256 to 511, inclusive, or in the rangeof 2³¹ to 2³²−2, inclusive, and bitstreams shall not contain suchvalues.

-   -   NOTE 1—The comp_scale_id can be used to support component        scaling processes that are suitable for different display        scenarios. For example, different values of comp_scale_id may        correspond to different display bit depths or different colour        spaces in which the scaling is applied.

Alternatively, the comp_scale_id may also be used to identify whetherthe scaling is performed for compatibility to certain types of displaysor decoder, e.g. HDR, SDR.

comp_scale_cancel_flag equal to 1 indicates that the component scalinginformation SEI message cancels the persistence of any previouscomponent information SEI messages in output order that applies to thecurrent layer. comp_scale_cancel_flag equal to 0 indicates thatcomponent scaling information follows.

comp_scale_persistence_flag specifies the persistence of the componentscaling information SEI message for the current layer.

comp_scale_persistence_flag equal to 0 specifies that the componentscaling information applies to the current decoded picture only.

Let picA be the current picture. comp_scale_persistence_flag equal to 1specifies that the component scaling information persists for thecurrent layer in output order until any of the following conditions aretrue:

-   -   A new CLVS of the current layer begins.    -   The bitstream ends.    -   A picture picB in the current layer in an access unit containing        a component scaling information SEI message with the same value        of comp_scale_id and applicable to the current layer is output        for which PicOrderCnt(picB) is greater than PicOrderCnt(picA),        where PicOrderCnt(picB) and PicOrderCnt(picA) are the        PicOrderCntVal values of picB and picA, respectively,        immediately after the invocation of the decoding process for        picture order count for picB.

comp_scale_scale_bit_depth specifies the number of bits used to signalthe syntax element comp_scale_scale_val[c][i]. The value ofcomp_scale_scale_bit_depth shall be in the range of 0 to 15, inclusive.

comp_scale_offset_bit_depth specifies the number of bits used to signalthe syntax elements comp_scale_global_offset_val[c] andcomp_scale_offset_val[c][i]. The value of comp_scale_offset_bit_depthshall be in the range of 0 to 15, inclusive.

comp_scale_scale_frac_bit_depth specifies the number of LSBs used toindicate the fractional part of the scale parameter of the i-thpartition of the c-th component. The value ofcomp_scale_scale_frac_bit_depth shall be in the range of 0 to 15,inclusive. The value of comp_scale_scale_frac_bit_depth shall be lessthan or equal to the value of comp_scale_scale_bit_depth.

comp_scale_offset_frac_bit_depth specifies the number of LSBs used toindicate the fractional part of the offset parameter of the i-thpartition of the c-th component and global offset of the c-th component.The value of comp_scale_offset_frac_bit_depth shall be in the range of 0to 15, inclusive. The value of comp_scale_offset_frac_bit_depth shall beless than or equal to the value of comp_scale_offset_bit_depth.

comp_scale_num_comps_minus1 plus 1 specifies the number of componentsfor which the component scaling function is specified.comp_scale_num_comps_minus1 shall be in the range of 0 to 2, inclusive.

comp_scale_num_ranges[c] specifies the number of ranges in to which theoutput sample range is partitioned in to. The value ofcomp_scale_num_ranges[c] shall be in the range of 0 to 63, inclusive.

comp_scale_equal_ranges_flag[c] equal to 1 indicates that that outputsample range is partitioned into comp_scale_num_ranges[c] nearly equalpartitions, and the partition widths are not explicitly signalled.comp_scale_equal_ranges_flag[c] equal to 0 indicates that that outputsample range may be partitioned into comp_scale_num_ranges[c] partitionsnot all of which are of the same size, and the partitions widths areexplicitly signalled.

comp_scale_global_offset_val[c] is used to derive the offset value thatis used to map the smallest value of the valid input data range for thec-th component. The length of comp_scale_global_offset_val[c] iscomp_scale_offset_bit_depth bits.

comp_scale_scale_val[c][i] is used to derive the offset value that isused to derive the width of the of the i-th partition of the c-thcomponent. The length of comp_scale_global_offset_val[c] iscomp_scale_offset_bit_depth bits.

The variable CompScaleScaleVal[c][i] is derived as follows:

CompScaleScaleVal[ c ][ i ] = ( comp_scale_scale_val[ c ][ i ] >>comp_scale_scale_frac_bit_depth) + ( comp_scale_scale_val[ c ][ i ] & ((1 << comp_scale_scale_frac_bit_depth) − 1) ) ÷ (1 <<comp_scale_scale_frac_bit_depth)

comp_scale_offset_val[c][i] is used to derive the offset value that isused to derive the width of the of the i-th partition of the c-thcomponent. The length of comp_scale_global_offset_val[c] iscomp_scale_offset_bit_depth bits.

When comp_scale_offset_val[c][i] is signalled, the value ofCompScaleOffsetVal[c][i] is derived as follows:

CompScaleOffsetVal[ c ][ i ] = ( comp_scale_offset_val[ c ][ i ] >>comp_scale_offset_frac_bit_depth) + ( comp_scale_offset_val[ c ][ i ] & ((1 << comp_scale_offset_frac_bit_depth ) − 1) ) ÷ (1 <<comp_scale_offset_frac_bit_depth)

Alternatively, the variable CompScaleScaleVal[c][i] andCompScaleOffsetVal[c][i] are derived as follows:

CompScaleScaleVal[ c ][ i ] = comp_scale_scale_val[ c ][ i ] ÷ (1 <<comp_scale_scale_frac_bit_depth ) CompScaleOffsetVal[ c ][ i ] =comp_scale_offset_val[ c ][ i ] ÷ (1 << comp_scale_offset_frac_bit_depth)

When comp_scale_equal_ranges_flag[c] is equal to 1,comp_scale_offset_val[c][i] is not signalled, and the value ofCompScaleOffsetVal[c][i] is derived as follows:CompScaleOffsetVal[c][i]=1÷comp_scale_num_ranges[c]

The variable CompScaleOutputRanges[c][i] and CompScaleOutputRanges[c][i]for i in the range of 0 to comp_scale_num_ranges[c] is derived asfollows:

for( i = 0; i <= comp_scale_num_ranges[ c ]; i++ )  if( i = = 0 )CompScaleOutputRanges[ c ][ i ] = comp_scale_global_offset_val[ c ] ÷ (1<< comp_scale_offset_frac_bit_depth ) CompScaleInputRanges[ c ][ i ] = 0 else CompScaleInputRanges[ c ][ i ] = CompScaleOffsetInputRanges[ c ][i − 1 ] + (CompScaleOffsetVal[ c ][ i − 1 ] * CompScaleScaleVal[ c ][ i− 1 ] CompScaleOutputRanges[ c ][ i ] = CompScaleOutputRanges[ c ][ i −1 ] + CompScaleOffsetVal[ c ][ i − 1 ]

In one alternative, the values of CompScaleOutputRanges[ ][ ] andCompScaleOutputRanges[ ][ ] are derived as follows:

for( i = 0; i <= comp_scale_num_ranges[ c ]; i++ )  if( i = = 0 )CompScaleInputRanges[ c ][ i ] = comp_scale_global_offset_val[ c ] ÷ (1<< comp_scale_offset_frac_bit_depth ) CompScaleOutputRanges[ c ][ i ] =0  else CompScaleInputRanges[ c ][ i ] = CompScaleOffsetInputRanges[ c][ i − 1 ] + (CompScaleOffsetVal[ c ][ i − 1 ] * CompScaleScaleVal[ c ][i − 1 ] CompScaleOutputRanges[ c ][ i ] = CompScaleOutputRanges[ c ][ i− 1 ] + CompScaleOffsetVal[ c ][ i − 1 ]

The process of mapping an input signal representation (which may be usedto cover both integer as well as floating point) x and an output signalrepresentation y, where the sample values for both input representationis normalized in the range of 0 to 1, and output representation is inthe range of and 0 to 1, is specified as follows:

if( x <= CompScaleInputRanges[ c ][ 0 ] ) y = CompScaleOutputRanges[ c][ 0 ] else if( x > CompScaleInputRanges[ c ][ comp_scale_num_ranges[ c] ] ) y = CompScaleOutputRanges[ c ][ comp_scale_num_ranges[ c ]; ] elsefor( i = 1; i <= comp_scale_num_ranges[ c ]; i++ ) if(CompScaleInputRanges[ i − 1 ] < x && x <= CompScaleInputRanges[ i ] ) y= ( x − CompScaleInputRanges[ i − 1 ]) ÷ comp_scale_val[ c ][ i ] +CompScaleOutputRanges[ c ][ i − 1 ]

In one alternative, the value of CompScaleOutputRanges[c][0] is setbased on the permitted sample value range.

Alternatively, the process of mapping an input value valIn to outputvalue valOut is defined as follows:

m_pAtfRangeIn[ 0 ] = 0; m_pAtfRangeOut[ 0 ] = −m_offset2*m_pAtfScale2[c][0]; for (int j = 1; j < m_atfNumberRanges + 1; j++) {m_pAtfRangeIn[ j ] = m_pAtfRangeIn[j − 1] + m_pAtfDelta[j − 1];m_pAtfRangeOut[ j ] = m_pAtfRangeOut[j − 1] + m_pAtfScale2[ c ][ j − 1] * m_pAtfDelta[ j − 1 ]; } for (int j = 0; j < numRanges && skip = = 0;j++) { if (valIn <= pAtfRangeIn[ j + 1 ]) { valOut = (valIn −pOffset[component][ j ]) * pScale[ component ][ j ]; skip = 1; } ]

In one alternative, m_offset2 is equal tocomp_scale_global_offset_val[c]□□(1<<comp_scale_offset_frac_bit_depth),m_pAtfScale[c][i] is equal to CompScaleScaleVal[c][i] and m_pAtfDelta[i]is equal to CompScaleOffsetVal[c][i] for the c-th component, and pScaleand pOffset are scale and offset parameter derived from m AtfScale andm_pAtfDelta.

An inverse operation would be defined accordingly.

Example 6

In some examples, some of signaling methods described above, e.g., inexample 5, can be utilized as shown in following pseudo code.

m_atfNumberRanges is a term for for syntax elementscomp_scale_num_ranges[c] for a given c, that specifies number of dynamicrange partitioning for mapped data.

m_pAtfRangeIn is a term for CompScalelnputRanges, is an arrays size ofm_atfNumberRanges+1 that includes input sample value specifying theborder between two concatenated partitions, e.g. i and i+1.

m_pAtfRangeOut is a term for CompScaleOutputRanges, is an arrays size ofm_atfNumberRanges+1 that includes output sample value specifying theborder between two concatenated partitions, e.g. i and i+1.

m_pAtfScale2 is a term for variable CompScaleScaleVal [c] is an arrayssize of m_atfNumberRanges that includes scale values for eachpartitions.

m_pAtfOffset2 is an array arrays size of m_atfNumberRanges that includesoffset values for each partition.

m_offset2 is a term for comp_scale_global_offset_val.

In this example, parameters of piece-wise linear model can be determinedform syntax elements as in Algorithm 1:

Algorithm 1: m_pAtfRangeIn[0] = 0; m_pAtfRangeOut[0] = −m_offset2*m_pAtfScale2[c][0]; for (int j = 1; j < m_atfNumberRanges + 1; j++) {m_pAtfRangeIn[j] = m_pAtfRangeIn[j − 1] + m_pAtfDelta[j − 1];m_pAtfRangeOut[j] = m_pAtfRangeOut[j − 1] + m_pAtfScale2[c][j − 1] *m_pAtfDelta[j − 1]; } for (int j = 0; j < m_atfNumberRanges; j++) { temp= m_pAtfRangeIn[j + 1] − m_pAtfRangeOut[j + 1] / m_pAtfScale2[c][j];m_pAtfOffset2[c][j] = temp; }

Once determined, piece-wise linear model can be applied to input samplesvalue inValue to determine output sample value outValue as in Algorithm2:

Algorithm 2: for (int j = 0; j < m_atfNumberRanges && skip == 0; j++) {if (inValue <= m_pAtfRangeIn[j + 1]) { outValue = (inValue −m_pAtfOffset2 [j]) * m_pAtfScale2 [j]; skip = 1; } }

Inverse process to be conducted as in Algorithm 3:

Algorithm 3: for (int j = 0; j < m_atfNumberRanges && skip == 0; j++) {if (inValue <= m_pAtfRangeOut[j + 1]) { outValue = inValue /m_pAtfScale2 [j] + m_pAtfOffset2 [j]; skip = 1; } }

In some examples, border sample value (an entry of m_pAtfRangeIn orm_pAtfRangeOut) between two concatenated partitions i and i+1 can beinterpreted differently, as belonging to i+1, instead of belonging to ipartition as it is shown in Algorithm 2 and 3.

In some examples, inverse process shown in Algorithm 3, can beimplemented with a multiplication by m_pAtfInverseScale2 value, insteadof division by m_pAtfScale2[j]. In such examples, a value ofm_pAtfScale2[j] is determined from m_pAtfScale2 [j] in advance.

In some examples, m_pAtfInverseScale2 [j] is determined at the decoderside as 1/m_pAtfScale2[j].

In some examples, m_pAtfInverseScale2 [j] can be computed at the encoderside, and signalled through bitstream. In such examples, operation givenin Algorithms 1, 2 and 3 will be adjusted accordingly.

Various Examples

In some examples, proposed signaling mechanism can be used to model apiece-wise function that can be utilized to enable dynamical rangeadjustment for samples of input signal, e.g. to improve compressionefficiency of video coding systems.

In some examples, proposed signaling mechanism can be used to model apiece-wise function that can be applied to codewords (non-linearrepresentation of R,G,B samples) produced by an OETF, e.g. by PQ TF ofST.2084, or others.

In some examples, proposed signaling mechanism can be used to model apiece-wise function that can be applied to samples of YCbCr colors.

In some examples, proposed signaling mechanism can be used to model apiece-wise function that can be utilized to HDR/WCG solutions with SDRcompatibility.

In some examples, proposed signaling mechanism can be used to model apiece-wise function that can be applied to samples in floating pointrepresentation. In yet another example, proposed signaling mechanism andresulting function can be applied to samples in integer representation,e.g. 10 bits.

In some examples, proposed signaling mechanism can be used to model apiece-wise function that can be applied to samples in a form of Look UpTables. In yet another examples, proposed signaling can be used to modelfunction that can be applied to a sample in a form of multiplier.

Combinations and Extensions

In the examples above, a linear model is assumed for each region (i.e.,scale plus offset); the techniques of this disclosure also may beapplicable for higher-order polynomial models, for example, with apolynomial of 2nd degree requiring three parameters instead of two. Thesignaling and syntax would be properly extended for this scenario.

Combinations of aspects described above are possible and part of thetechniques of this disclosure.

Toolbox combination: there are several HDR methods that can targetsomewhat similar goals to those of the SEIs described in thisdisclosure. In order to accommodate more than one of them but, at thesame time, limiting the number of applicable SEI processing per frame,it is proposed to combine (one or more of) these methods in a singleSEI. A proposed syntax element would indicate the specific method toapply in each instance. For example, if there are two possible methodsin the SEI, the syntax element would be a flag indicating the one to beused.

Example 7

In this example, the signaling of scale parameters is modified such thatnegative scales can be transmitted, and the signaled scale parametersindicate the variation of scale to be applied for different ranges ofthe various components. The changes with respect to example 5 are below.

Changes to Syntax of the SEI Message

Descrip- tor component_scale_info( payloadSize ) {  comp_scale_id ue(v) comp_scale_cancel_flag u(1)  if( !comp_scale_cancel_flag ) {comp_scale_persistence_flag u(1) comp_scale_scale_bit_depth u(4)comp_scale_offset_bit_depth u(4) comp_scale_scale_frac_bit_depth u(4)comp_scale_offset_frac_bit_depth u(4)comp_scale_negative_scales_present_flag u(1) comp_scale_dep_component_idue(v) comp_scale_num_comps_minus1 ue(v) for( c = 0; c <=comp_scale_num_comps_minus1; c++ ) {  comp_scale_num_ranges[ c ] ue(v) comp_scale_equal_ranges_flag[ c ] u(1)  comp_scale_global_offset_val[ c] u(v)  for( i = 0; i <= comp_scale_num_ranges[ c ]; i++ )comp_scale_scale_val[ c ][ i ] u(v)  if( !comp_scale_equal_ranges[ c ])u(v) for( i = 0; i <= comp_scale_num_ranges[ c ]; i++ ) comp_scale_offset_val[ c ][ i ] u(v)  } }Changes to Semantics of the SEI Message

comp_scale_negative_scales_present_flag equal to 1 specifies that theinteger part of the scale parameters derived fromcomp_scale_scale_val[c][i] is represented as a signed integer.comp_scale_negative_scales_present_flag equal to 0 specifies that theinteger part scale parameters derived from comp_scale_scale_val[c][i] isrepresented as an unsigned integer.

In one alternative, another set of offset parameters are signaled alongwith comp_scale_scale_val that are used to define the offset that isapplied along with the scale on a first component as a function of thevalue of a second component.

The signed-integer representation includes, but is not limited to,twos-complement notation and signed magnitude representation (one bitfor sign and the remaining bits in the integer-part). The derivationbelow is given for the signed magnitude representation. The derivationcan be similarly defined for other forms of signed representations.

The variable CompScaleScaleVal[ c ][ i ] is derived as follows :compScaleScaleFracPart = ( comp_scale_scale_val[ c ][ i ] &  ( (1 <<comp_scale_scale_frac_bit_depth) − 1) ) ÷ (1 <<comp_scale_scale_frac_bit_depth ) if(comp_scale_negative_scales_present_flag ) {  compScaleSignPart =comp_scale_scale_val[ c ][ i ] >> (comp_scale_scale_bit_depth − 1) compScaleIntegerPart = comp_scale_scale_val[ c ][ i ] − ( compScaleSignPart << (comp_scale_scale_bit_depth − 1) ) compScaleIntegerVal = ( ( compScaleSignPart = = 1 ) : −1 : 1 ) *compScaleIntegerPart } else  compScaleIntegerVal = comp_scale_scale_val[c ][ i ] >> comp_scale_scale_frac_bit_depthCompScaleScaleVal[c][i]=compScaleIntegerVal+compScaleScaleFracPart

It is a requirement of bitstream conformance that whencomp_scale_negative_scale_present_flag is equal to 1, the value ofcomp_scale_scale_bit_depth shall be greater than or equal tocomp_scale_scale_frac_bit_depth

comp_scale_dependent_component_id specifies the application of scale andoffset parameters to the various components of the video. Whencomp_scale_dependent_component_id is equal to 0, the syntax elementscomp_scale_global_offset_val[c], comp_scale_scale_val[c][i] andcomp_scale_offset_val[c][i] are used to identify mapping of input andoutput values of the c-th component. Whencomp_scale_dependent_component_id is greater than 0,comp_scale_dependent_component_id−1 specifies the index of the componentsuch that the syntax elements comp_scale_global_offset_val[c],comp_scale_scale_val[c][i] and comp_scale_offset_val[c][i] specify themapping of a scale parameter to be applied to the c-th component of asample as a function of the value of(comp_scale_dependent_component_id−1)-th component of the sample.

The rest of the semantics is similar to those described in example 5.

Example 8

In this example, the bit depth of the ATF parameters depend on thecomponent. For each component, the bit depth of the syntax elements isexplicitly signal. In addition, there are default bit-depth for thosesyntax elements. The default value is assigned when the bit depth is notexplicitly signaled. A flag might indicate whether the default valuesare applied or they are explicitly signaled.

The table below shows an example of these concepts. Syntax elements ofthe ATF parameters are the scale hdr_recon_scale_val[ ][ ] and rangehdr_recon_range_val[ ][ ]. The syntax elements indicating thecorresponding bit depth (integer and fractional part) are the followingones:

hdr_recon_scale_bit_depth[c],

hdr_recon_offset_bit_depth[c],

hdr_recon_scale_frac_bit_depth[c],

hdr_recon_offset_frac_bit_depth[c],

where c is the component index. The default bit-depths for scale andoffset (range) can be set to:

hdr_recon_scale_bit_depth[c]=8,

hdr_recon_offset_bit_depth[c]=8,

hdr_recon_scale_frac_bit_depth[c]=6,

hdr_recon_offset_frac_bit_depth[c]=8.

The accuracy of the parameters might also be different for the ATFparameters and the color adjustment parameters. Also, the default mightbe different per component and for the color adjustment parameters. Inthis example, the defaults are assumed to be the same.

Descrip- tor hdr_reconstruction_info( payloadSize ) {  hdr_recon_idue(v)  hdr_recon_cancel_flag u(1)  if( !hdr_recon_cancel flag ) {hdr_recon_persistence_flag u(1) if (hdr_recon_id = = 1 ) { hdr_output_full_range_flag  hdr_output_colour_primaries hdr_output_transfer_characteristics  hdr_output_matrix_coeffs } SYNTAXFOR THE MAPPING LUTs hdr_recon_num_comps_minus1 ue(v) for( c = 0; c <=hdr_recon_num_comps_minus1; c++ ) {   hdr_recon_default_bit_depth [ c ]u(1)   if ( hdr_recon_default_bit_depth [   c ] == 0) { hdr_recon_scale_bit_depth[ c ] u(4) hdr_recon_offset_bit_depth[ c ]u(4) hdr_recon_scale_frac_bit_depth[ c ] u(4)hdr_recon_offset_frac_bit_depth[ c ] u(4)   }  hdr_recon_num_ranges[ c ]ue(v)  hdr_recon_equal_ranges_flag[ c ] u(1) hdr_recon_global_offset_val[ c ] u(v)  for( i = 0; i <=hdr_recon_num_ranges[ c ];  i++ )  hdr_recon_scale_val[ c ][ i ] u(v) if( !hdr_recon_equal_ranges[ c ] ) u(v)  for( i = 0; i <=hdr_recon_num_ranges[ c ];  i++ ) hdr_recon_range_val [ c ] [ i ] u(v) }u(v) SYNTAX FOR THE COLOR CORRECTION PART if (hdr_recon_id = = 1 ) {Params related to Colour correction  hdr_color_correction_type 0: on U,V − 1: on R, G, B  hdr_color_accuracy_flag Syntax for coding the colour if( ! hdr_recon_color_accuracy_flag ) { correction LUT  hdr_color_scale_bit_depth u(4)  hdr_color _offset_bit_depth u(4)  hdr_color_scale_frac_bit_depth u(4)  hdr_color _offset_frac_bit_depth u(4)  } color_correction_num_ranges  color_correction_equal_len_ranges_flag color_correction_zero_offset_val  for( i = 0; i < color correctionnum_ranges;  i++ )  color_correction_scale_val[ i ]  if( !color_correction_equal_len_ranges_flag )  for( i = 0; i < colorcorrection num_ranges;  i++ ) color_correction_range_val[ i ]  } }  } }

Example 9

A desirable property of a new HDR solution is that it is backwardcompatible to previous HDR solutions, like HDR10. A syntax element mayindicate that this is the case. This indicates a characteristic of thebitstream, and an HDR decoder might decide not to spend computationalresources on the inverse ATF processing under some circumstances if thenon ATF version is already viewable.

In one example, some values of the hdr_recon_id syntax element arereserved to indicate HDR10 backward compatibility, or to what degreethere is backward compatibility.

In another example, a flag (hdr_recon_hdr10_bc) indicates thissituation.

In one example, the signaled HDR10 backward compatibility indicates thatthe bitstream is viewable. Alternatively, it might indicate somespecific properties of the signaled values: for example, that they are arange of values that guarantees this property. For instance, aconstraint could be that the scale is between 0.9 and 1.1.

FIG. 12 is a block diagram illustrating an example of video encoder 20that may implement the techniques of this disclosure. Video encoder 20may perform intra- and inter-coding of video blocks within video slicesin a target color representation that have been processed by videopreprocessor 19. Intra-coding relies on spatial prediction to reduce orremove spatial redundancy in video within a given video frame orpicture. Inter-coding relies on temporal prediction to reduce or removetemporal redundancy in video within adjacent frames or pictures of avideo sequence. Intra-mode (I mode) may refer to any of several spatialbased coding modes. Inter-modes, such as uni-directional prediction (Pmode) or bi-prediction (B mode), may refer to any of severaltemporal-based coding modes.

As shown in FIG. 12, video encoder 20 receives a current video blockwithin a video frame to be encoded. In the example of FIG. 12, videoencoder 20 includes mode select unit 40, a video data memory 41, decodedpicture buffer 64, summer 50, transform processing unit 52, quantizationunit 54, and entropy encoding unit 56. Mode select unit 40, in turn,includes motion compensation unit 44, motion estimation unit 42, intraprediction processing unit 46, and partition unit 48. For video blockreconstruction, video encoder 20 also includes inverse quantization unit58, inverse transform processing unit 60, and summer 62. A deblockingfilter (not shown in FIG. 12) may also be included to filter blockboundaries to remove blockiness artifacts from reconstructed video. Ifdesired, the deblocking filter would typically filter the output ofsummer 62. Additional filters (in loop or post loop) may also be used inaddition to the deblocking filter. Such filters are not shown forbrevity, but if desired, may filter the output of summer 50 (as anin-loop filter).

Video data memory 41 may store video data to be encoded by thecomponents of video encoder 20. The video data stored in video datamemory 41 may be obtained, for example, from video source 18. Decodedpicture buffer 64 may be a reference picture memory that storesreference video data for use in encoding video data by video encoder 20,e.g., in intra- or inter-coding modes. Video data memory 41 and decodedpicture buffer 64 may be formed by any of a variety of memory devices,such as dynamic random access memory (DRAM), including synchronous DRAM(SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or othertypes of memory devices. Video data memory 41 and decoded picture buffer64 may be provided by the same memory device or separate memory devices.In various examples, video data memory 41 may be on-chip with othercomponents of video encoder 20, or off-chip relative to thosecomponents.

During the encoding process, video encoder 20 receives a video frame orslice to be coded. The frame or slice may be divided into multiple videoblocks. Motion estimation unit 42 and motion compensation unit 44perform inter-predictive coding of the received video block relative toone or more blocks in one or more reference frames to provide temporalprediction. Intra prediction processing unit 46 may alternativelyperform intra-predictive coding of the received video block relative toone or more neighboring blocks in the same frame or slice as the blockto be coded to provide spatial prediction. Video encoder 20 may performmultiple coding passes, e.g., to select an appropriate coding mode foreach block of video data.

Moreover, partition unit 48 may partition blocks of video data intosub-blocks, based on evaluation of previous partitioning schemes inprevious coding passes. For example, partition unit 48 may initiallypartition a frame or slice into LCUs, and partition each of the LCUsinto sub-CUs based on rate-distortion analysis (e.g., rate-distortionoptimization). Mode select unit 40 may further produce a quadtree datastructure indicative of partitioning of an LCU into sub-CUs. Leaf-nodeCUs of the quadtree may include one or more PUs and one or more TUs.

Mode select unit 40 may select one of the coding modes, intra or inter,e.g., based on error results, and provides the resulting intra- orinter-coded block to summer 50 to generate residual block data and tosummer 62 to reconstruct the encoded block for use as a reference frame.Mode select unit 40 also provides syntax elements, such as motionvectors, intra-mode indicators, partition information, and other suchsyntax information, to entropy encoding unit 56.

Motion estimation unit 42 and motion compensation unit 44 may be highlyintegrated, but are illustrated separately for conceptual purposes.Motion estimation, performed by motion estimation unit 42, is theprocess of generating motion vectors, which estimate motion for videoblocks. A motion vector, for example, may indicate the displacement of aPU of a video block within a current video frame or picture relative toa predictive block within a reference picture (or other coded unit)relative to the current block being coded within the current picture (orother coded unit). A predictive block is a block that is found toclosely match the block to be coded, in terms of pixel difference, whichmay be determined by sum of absolute difference (SAD), sum of squaredifference (SSD), or other difference metrics. In some examples, videoencoder 20 may calculate values for sub-integer pixel positions ofreference pictures stored in decoded picture buffer 64. For example,video encoder 20 may interpolate values of one-quarter pixel positions,one-eighth pixel positions, or other fractional pixel positions of thereference picture. Therefore, motion estimation unit 42 may perform amotion search relative to the full pixel positions and fractional pixelpositions and output a motion vector with fractional pixel precision.

Motion estimation unit 42 calculates a motion vector for a PU of a videoblock in an inter-coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from a first reference picture list (List 0) ora second reference picture list (List 1), each of which identify one ormore reference pictures stored in decoded picture buffer 64. Motionestimation unit 42 sends the calculated motion vector to entropyencoding unit 56 and motion compensation unit 44.

Motion compensation, performed by motion compensation unit 44, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation unit 42. Again, motion estimationunit 42 and motion compensation unit 44 may be functionally integrated,in some examples. Upon receiving the motion vector for the PU of thecurrent video block, motion compensation unit 44 may locate thepredictive block to which the motion vector points in one of thereference picture lists. Summer 50 forms a residual video block bysubtracting pixel values of the predictive block from the pixel valuesof the current video block being coded, forming pixel difference values,as discussed below. In general, motion estimation unit 42 performsmotion estimation relative to luma components, and motion compensationunit 44 uses motion vectors calculated based on the luma components forboth chroma components and luma components. Mode select unit 40 may alsogenerate syntax elements associated with the video blocks and the videoslice for use by video decoder 30 in decoding the video blocks of thevideo slice.

Intra prediction processing unit 46 may intra-predict a current block,as an alternative to the inter-prediction performed by motion estimationunit 42 and motion compensation unit 44, as described above. Inparticular, intra prediction processing unit 46 may determine anintra-prediction mode to use to encode a current block. In someexamples, intra prediction processing unit 46 may encode a current blockusing various intra-prediction modes, e.g., during separate encodingpasses, and intra prediction processing unit 46 (or mode select unit 40,in some examples) may select an appropriate intra-prediction mode to usefrom the tested modes.

For example, intra prediction processing unit 46 may calculaterate-distortion values using a rate-distortion analysis for the varioustested intra-prediction modes, and select the intra-prediction modehaving the best rate-distortion characteristics among the tested modes.Rate-distortion analysis generally determines an amount of distortion(or error) between an encoded block and an original, unencoded blockthat was encoded to produce the encoded block, as well as a bit rate(that is, a number of bits) used to produce the encoded block. Intraprediction processing unit 46 may calculate ratios from the distortionsand rates for the various encoded blocks to determine whichintra-prediction mode exhibits the best rate-distortion value for theblock.

After selecting an intra-prediction mode for a block, intra predictionprocessing unit 46 may provide information indicative of the selectedintra-prediction mode for the block to entropy encoding unit 56. Entropyencoding unit 56 may encode the information indicating the selectedintra-prediction mode. Video encoder 20 may include in the transmittedbitstream configuration data, which may include a plurality ofintra-prediction mode index tables and a plurality of modifiedintra-prediction mode index tables (also referred to as codeword mappingtables), definitions of encoding contexts for various blocks, andindications of a most probable intra-prediction mode, anintra-prediction mode index table, and a modified intra-prediction modeindex table to use for each of the contexts.

Video encoder 20 forms a residual video block by subtracting theprediction data from mode select unit 40 from the original video blockbeing coded. Summer 50 represents the component or components thatperform this subtraction operation. Transform processing unit 52 appliesa transform, such as a discrete cosine transform (DCT) or a conceptuallysimilar transform, to the residual block, producing a video blockcomprising residual transform coefficient values. Transform processingunit 52 may perform other transforms which are conceptually similar toDCT. Wavelet transforms, integer transforms, sub-band transforms orother types of transforms could also be used. In any case, transformprocessing unit 52 applies the transform to the residual block,producing a block of residual transform coefficients. The transform mayconvert the residual information from a pixel value domain to atransform domain, such as a frequency domain. Transform processing unit52 may send the resulting transform coefficients to quantization unit54.

Quantization unit 54 quantizes the transform coefficients to furtherreduce bit rate. The quantization process may reduce the bit depthassociated with some or all of the coefficients. The degree ofquantization may be modified by adjusting a quantization parameter. Insome examples, quantization unit 54 may then perform a scan of thematrix including the quantized transform coefficients. Alternatively,entropy encoding unit 56 may perform the scan.

Following quantization, entropy encoding unit 56 entropy codes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy coding technique. In the caseof context-based entropy coding, context may be based on neighboringblocks. Following the entropy coding by entropy encoding unit 56, theencoded bitstream may be transmitted to another device (e.g., videodecoder 30) or archived for later transmission or retrieval.

Inverse quantization unit 58 and inverse transform processing unit 60apply inverse quantization and inverse transformation, respectively, toreconstruct the residual block in the pixel domain, e.g., for later useas a reference block. Motion compensation unit 44 may calculate areference block by adding the residual block to a predictive block ofone of the frames of decoded picture buffer 64. Motion compensation unit44 may also apply one or more interpolation filters to the reconstructedresidual block to calculate sub-integer pixel values for use in motionestimation. Summer 62 adds the reconstructed residual block to themotion compensated prediction block produced by motion compensation unit44 to produce a reconstructed video block for storage in decoded picturebuffer 64. The reconstructed video block may be used by motionestimation unit 42 and motion compensation unit 44 as a reference blockto inter-code a block in a subsequent video frame.

FIG. 13 is a block diagram illustrating an example of video decoder 30that may implement the techniques of this disclosure. In particular,video decoder 30 may decode video data into a target colorrepresentation that may then be processed by video postprocessor 31, asdescribed above. In the example of FIG. 13, video decoder 30 includes anentropy decoding unit 70, a video data memory 71, motion compensationunit 72, intra prediction processing unit 74, inverse quantization unit76, inverse transform processing unit 78, decoded picture buffer 82 andsummer 80. Video decoder 30 may, in some examples, perform a decodingpass generally reciprocal to the encoding pass described with respect tovideo encoder 20 (FIG. 12). Motion compensation unit 72 may generateprediction data based on motion vectors received from entropy decodingunit 70, while intra prediction processing unit 74 may generateprediction data based on intra-prediction mode indicators received fromentropy decoding unit 70.

Video data memory 71 may store video data, such as an encoded videobitstream, to be decoded by the components of video decoder 30. Thevideo data stored in video data memory 71 may be obtained, for example,from computer-readable medium 16, e.g., from a local video source, suchas a camera, via wired or wireless network communication of video data,or by accessing physical data storage media. Video data memory 71 mayform a coded picture buffer (CPB) that stores encoded video data from anencoded video bitstream. Decoded picture buffer 82 may be a referencepicture memory that stores reference video data for use in decodingvideo data by video decoder 30, e.g., in intra- or inter-coding modes.Video data memory 71 and decoded picture buffer 82 may be formed by anyof a variety of memory devices, such as dynamic random access memory(DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM),resistive RAM (RRAM), or other types of memory devices. Video datamemory 71 and decoded picture buffer 82 may be provided by the samememory device or separate memory devices. In various examples, videodata memory 71 may be on-chip with other components of video decoder 30,or off-chip relative to those components.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Entropy decoding unit70 of video decoder 30 entropy decodes the bitstream to generatequantized coefficients, motion vectors or intra-prediction modeindicators, and other syntax elements. Entropy decoding unit 70 forwardsthe motion vectors to and other syntax elements to motion compensationunit 72. Video decoder 30 may receive the syntax elements at the videoslice level and/or the video block level.

When the video slice is coded as an intra-coded (I) slice, intraprediction processing unit 74 may generate prediction data for a videoblock of the current video slice based on a signaled intra predictionmode and data from previously decoded blocks of the current frame orpicture. When the video frame is coded as an inter-coded (i.e., B or P)slice, motion compensation unit 72 produces predictive blocks for avideo block of the current video slice based on the motion vectors andother syntax elements received from entropy decoding unit 70. Thepredictive blocks may be produced from one of the reference pictureswithin one of the reference picture lists. Video decoder 30 mayconstruct the reference picture lists, List 0 and List 1, using defaultconstruction techniques based on reference pictures stored in decodedpicture buffer 82. Motion compensation unit 72 determines predictioninformation for a video block of the current video slice by parsing themotion vectors and other syntax elements, and uses the predictioninformation to produce the predictive blocks for the current video blockbeing decoded. For example, motion compensation unit 72 uses some of thereceived syntax elements to determine a prediction mode (e.g., intra- orinter-prediction) used to code the video blocks of the video slice, aninter-prediction slice type (e.g., B slice or P slice), constructioninformation for one or more of the reference picture lists for theslice, motion vectors for each inter-encoded video block of the slice,inter-prediction status for each inter-coded video block of the slice,and other information to decode the video blocks in the current videoslice.

Motion compensation unit 72 may also perform interpolation based oninterpolation filters. Motion compensation unit 72 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 72 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.

Inverse quantization unit 76 inverse quantizes, i.e., de-quantizes, thequantized transform coefficients provided in the bitstream and decodedby entropy decoding unit 70. The inverse quantization process mayinclude use of a quantization parameter QPy calculated by video decoder30 for each video block in the video slice to determine a degree ofquantization and, likewise, a degree of inverse quantization that shouldbe applied. Inverse transform processing unit 78 applies an inversetransform, e.g., an inverse DCT, an inverse integer transform, or aconceptually similar inverse transform process, to the transformcoefficients in order to produce residual blocks in the pixel domain.

After motion compensation unit 72 generates the predictive block for thecurrent video block based on the motion vectors and other syntaxelements, video decoder 30 forms a decoded video block by summing theresidual blocks from inverse transform processing unit 78 with thecorresponding predictive blocks generated by motion compensation unit72. Summer 80 represents the component or components that perform thissummation operation. If desired, a deblocking filter may also be appliedto filter the decoded blocks in order to remove blockiness artifacts.Other loop filters (either in the coding loop or after the coding loop)may also be used to smooth pixel transitions, or otherwise improve thevideo quality. The decoded video blocks in a given frame or picture arethen stored in decoded picture buffer 82, which stores referencepictures used for subsequent motion compensation. Decoded picture buffer82 also stores decoded video for later presentation on a display device,such as display device 32 of FIG. 1.

FIG. 14 is a flowchart illustrating an example HDR/WCG conversionprocess according to the techniques of this disclosure. The techniquesof FIG. 14 may be executed by source device 12 of FIG. 1, including oneor more of video preprocessor 19 and/or video encoder 20.

In one example of the disclosure, source device 12 may be configured toencode video data. Such a device may perform a dynamic range adjustmenton the video data to generate adjusted component values from the videodata (1502), and signal at least one supplemental enhancementinformation (SEI) message in an encoded video bitstream, the at leastone SEI message indicating adjustment information specifying how thedynamic range adjustment has been applied to the video data, and whereinthe adjustment information includes a global offset value that appliesto each of a plurality of partitions into which the video data waspartitioned during the dynamic range adjustment (1504). In the exampleof FIG. 14, the video data is input video data prior to video encoding.In some other examples, the source device may signal at least one SEImessage in an encoded video bitstream, the at least one SEI messageindicating adjustment information specifying how the inverse dynamicrange adjustment is to applied on the video data by a decoder, andwherein the adjustment information includes a global offset value thatapplies to each of a plurality of partitions into which the video datais to be partitioned during the dynamic range adjustment (1504).

In some examples, the global offset value is a first global offsetvalue, the first global offset value being substituted, prior toperforming the dynamic range adjustment on the video data, forunadjusted component values less than the first global offset value,wherein the adjustment information further includes a second globaloffset value, and wherein performing the dynamic range adjustment on thevideo data includes: mapping component values matching the first globaloffset value to the second global offset value.

In other examples, the adjustment information further includes a numberof partitions into which the video data was partitioned during thedynamic range adjustment, a scale and a local offset value for one ormore partitions, and wherein performing the dynamic range adjustmentincludes: generating the adjusted component values according to thenumber of partitions, and scale and local offsets for one or morepartitions (1506).

FIG. 15 is a flowchart illustrating an example HDR/WCG inverseconversion process according to the techniques of this disclosure. Thetechniques of FIG. 15 may be executed by destination device 14 of FIG.1, including one or more of video postprocessor 31 and/or video decoder30.

In one example of the disclosure, destination device 14 may beconfigured to decode video data that has been adjusted by performing adynamic range adjustment. Such a device may receive at least onesupplemental enhancement information (SEI) message in an encoded videobitstream, the at least one SEI message indicating adjustmentinformation specifying how the dynamic range adjustment has been appliedto the video data, and wherein the adjustment information includes aglobal offset value that applies to each of a plurality of partitionsinto which the video data was partitioned during the dynamic rangeadjustment (1602), and perform an inverse dynamic range adjustment onthe video data in accordance with the adjustment information to generateunadjusted component values from the video data (1604). In the exampleof FIG. 15, the video data is decoded video data. In other examples,device may receive at least one supplemental enhancement information(SEI) message in an encoded video bitstream, the at least one SEImessage indicating adjustment information specifying how the dynamicrange adjustment is to be applied to the video data, and wherein theadjustment information includes a global offset value that applies toeach of a plurality of partitions into which the video data is to bepartitioned during the inverse dynamic range adjustment (1604), andperform an inverse dynamic range adjustment on the video data inaccordance with the adjustment information to generate unadjustedcomponent values from the video data (1604).

In some examples, the global offset value is a first global offsetvalue, the first global offset value being substituted, prior toperforming the dynamic range adjustment on the video data, forunadjusted component values less than the first global offset value,wherein the adjustment information further includes a second globaloffset value, and wherein performing the inverse dynamic rangeadjustment on the video data includes: mapping component values matchingthe second global offset value to the first global offset value.

In other examples, the adjustment information further includes a numberof partitions into which the video data was partitioned during thedynamic range adjustment, and a scale and local offset for one or morepartitions and wherein performing the inverse dynamic range adjustmentincludes: generating the unadjusted component values according to thenumber of partitions and the scale and offset for one or more partitions(1606).

Certain aspects of this disclosure have been described with respect toextensions of the HEVC standard for purposes of illustration. However,the techniques described in this disclosure may be useful for othervideo coding processes, including other standard or proprietary videocoding processes not yet developed.

A video coder, as described in this disclosure, may refer to a videoencoder or a video decoder. Similarly, a video coding unit may refer toa video encoder or a video decoder. Likewise, video coding may refer tovideo encoding or video decoding, as applicable.

It is to be recognized that depending on the example, certain acts orevents of any of the techniques described herein can be performed in adifferent sequence, may be added, merged, or left out altogether (e.g.,not all described acts or events are necessary for the practice of thetechniques). Moreover, in certain examples, acts or events may beperformed concurrently, e.g., through multi-threaded processing,interrupt processing, or multiple processors, rather than sequentially.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over as oneor more instructions or code on a computer-readable medium and executedby a hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transitory media, but areinstead directed to non-transitory, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

What is claimed is:
 1. A method of decoding video data that has beenadjusted by performing a dynamic range adjustment, the methodcomprising: receiving at least one syntax structure from an encodedvideo bitstream, the at least one syntax structure indicating adjustmentinformation specifying how the dynamic range adjustment has been appliedto the video data, and wherein the adjustment information includes: atone mapping adjustment value that indicates color values can be trimmedto a maximum or a minimum value, and a number of partitions into whichthe video data was partitioned during the dynamic range adjustment; andperforming an inverse dynamic range adjustment on the video data inaccordance with the adjustment information to generate unadjustedcomponent values from the video data, wherein performing the inversedynamic range adjustment includes generating the unadjusted componentvalues according to the number of partitions.
 2. The method of claim 1,wherein the adjustment information further includes a global offsetvalue that applies to each of the partitions into which the video datawas partitioned during the dynamic range adjustment.
 3. The method ofclaim 2, wherein the global offset value is a first global offset value,the first global offset value being substituted, prior to performing thedynamic range adjustment on the video data, for unadjusted componentvalues less than the first global offset value; wherein the adjustmentinformation further includes a second global offset value; and whereinperforming the inverse dynamic range adjustment on the video dataincludes: mapping component values matching the second global offsetvalue to the first global offset value.
 4. The method of claim 1,wherein the video data includes luma components and chroma components,wherein the adjustment information includes a first number of partitionsinto which the luma components were partitioned during the dynamic rangeadjustment, a second number of partitions into which a first set of thechroma components were partitioned during the dynamic range adjustment,and a third number of partitions into which a second set of the chromacomponents were partitioned during the dynamic range adjustment, andwherein performing the inverse dynamic range adjustment includes:generating unadjusted luma component values according to the firstnumber of partitions; generating unadjusted chroma component valuescorresponding to the first set of chroma components according to thesecond number of partitions; and generating unadjusted chroma componentvalues corresponding to the second set of chroma components according tothe third number of partitions.
 5. The method of claim 1, furthercomprising: deriving additional adjustment information from the at leastone syntax structure, the additional adjustment information furtherspecifying how the dynamic range adjustment has been applied to thevideo data.
 6. The method of claim 1, wherein performing the inversedynamic range adjustment on the video data includes: determining foreach input sample for each component of the video data, a partition towhich the input sample belongs, and generating, for each of thepartitions, the unadjusted component values.
 7. The method of claim 1,wherein the adjustment information further includes a local offset valueand a local scale value for each of the partitions, and whereingenerating the unadjusted component values includes: generating theunadjusted component values according to the local offset value and thelocal scale value.
 8. The method of claim 7, wherein the local offsetvalue for each of the partitions is represented by a first number ofbits and a second number of bits, wherein the first number of bits isused to represent an integer part of the local offset value and thesecond number of bits is used to represent a fractional part of thelocal offset value, wherein the adjustment information further includesthe first number of bits and the second number of bits, and whereinperforming the inverse dynamic range adjustment on the video dataincludes: generating the unadjusted component values according to thelocal offset value for each of the partitions as represented by thefirst number of bits and the second number of bits.
 9. The method ofclaim 7, wherein the local scale value for each of the partitions isrepresented by a first number of bits and a second number of bits,wherein the first number of bits is used to represent an integer part ofthe local scale value and the second number of bits is used to representa fractional part of the local scale value, wherein the adjustmentinformation further includes the first number of bits and the secondnumber of bits, and wherein performing the inverse dynamic rangeadjustment on the video data includes: generating the unadjustedcomponent values according to the local scale value for each of thepartitions as represented by the first number of bits and the secondnumber of bits.
 10. A method of encoding video data comprising:performing a dynamic range adjustment on the video data to generateadjusted component values from the video data; and generating at leastone syntax structure in an encoded video bitstream, the at least onesyntax structure indicating adjustment information specifying how thedynamic range adjustment has been applied to the video data, wherein theadjustment information includes: a tone mapping adjustment value thatindicates color values can be trimmed to a maximum or a minimum value,and a number of partitions into which the video data was partitionedduring the dynamic range adjustment, and wherein performing the dynamicrange adjustment includes generating the adjusted component valuesaccording to the number of partitions.
 11. The method of claim 10,wherein the adjustment information further includes a local offset valueand a local scale value for each of the partitions, and whereinperforming the dynamic range adjustment on the video data includes:generating the adjusted component values according to the local offsetvalue and the local scale value.
 12. The method of claim 11, wherein thelocal offset value for each of the partitions is represented by a firstnumber of bits and a second number of bits, wherein the first number ofbits is used to represent an integer part of the local offset value andthe second number of bits is used to represent a fractional part of thelocal offset value, wherein the adjustment information further includesthe first number of bits and the second number of bits, and whereinperforming the dynamic range adjustment on the video data includes:generating the adjusted component values according to the local offsetvalue for each of the partitions as represented by the first number ofbits and the second number of bits.
 13. An apparatus configured todecode video data that has been adjusted by performing a dynamic rangeadjustment, the apparatus comprising: a memory configured to store thevideo data; and one or more processors configured to: receive at leastone syntax structure in an encoded video bitstream, the at least onesyntax structure indicating adjustment information specifying how thedynamic range adjustment has been applied to the video data, and whereinthe adjustment information includes: a tone mapping adjustment valuethat indicates color values can be trimmed to a maximum or a minimumvalue, and a number of partitions into which the video data waspartitioned during the dynamic range adjustment; and perform an inversedynamic range adjustment on the video data in accordance with theadjustment information to generate unadjusted component values from thevideo data, wherein performing the inverse dynamic range adjustmentincludes generating the unadjusted component values according to thenumber of partitions.
 14. The apparatus of claim 13, wherein theadjustment information further includes a global offset value thatapplies to each of the partitions into which the video data waspartitioned during the dynamic range adjustment.
 15. The apparatus ofclaim 14, wherein the global offset value is a first global offsetvalue, the first global offset value being substituted, prior toperforming the dynamic range adjustment on the video data, forunadjusted component values less than the first global offset value,wherein the adjustment information further includes a second globaloffset value; and wherein performing the inverse dynamic rangeadjustment on the video data includes: mapping component values matchingthe second global offset value to the first global offset value.
 16. Theapparatus of claim 13, wherein the video data includes luma componentsand chroma components, wherein the adjustment information includes afirst number of partitions into which the luma components werepartitioned during the dynamic range adjustment, a second number ofpartitions into which a first set of the chroma components werepartitioned during the dynamic range adjustment, and a third number ofpartitions into which a second set of the chroma components werepartitioned during the dynamic range adjustment, and wherein performingthe inverse dynamic range adjustment includes: generating unadjustedluma component values according to the first number of partitions;generating unadjusted chroma component values corresponding to the firstset of chroma components according to the second number of partitions;and generating unadjusted chroma component values corresponding to thesecond set of chroma components according to the third number ofpartitions.
 17. The apparatus of claim 13, wherein the one or moreprocessors are further configured to: derive additional adjustmentinformation from the at least one syntax structure, the additionaladjustment information further specifying how the dynamic rangeadjustment has been applied to the video data.
 18. The apparatus ofclaim 13, wherein performing the inverse dynamic range adjustment on thevideo data includes: determining for each input sample for eachcomponent of the video data, a partition to which the input samplebelongs, and generating, for each of the partitions, the unadjustedcomponent values.
 19. The apparatus of claim 13, wherein the adjustmentinformation further includes a local offset value and a local scalevalue for each of the partitions, and wherein performing the inversedynamic range adjustment on the video data includes: generating theunadjusted component values according to the local offset value and thelocal scale value.
 20. The apparatus of claim 19, wherein the localoffset value for each of the partitions is represented by a first numberof bits and a second number of bits, wherein the first number of bits isused to represent an integer part of the local offset value and thesecond number of bits is used to represent a fractional part of thelocal offset value, wherein the adjustment information further includesthe first number of bits and the second number of bits, and whereinperforming the inverse dynamic range adjustment on the video dataincludes: generating the unadjusted component values according to thelocal offset value for each of the partitions as represented by thefirst number of bits and the second number of bits.
 21. The apparatus ofclaim 19, wherein the local scale value for each of the partitions isrepresented by a first number of bits and a second number of bits,wherein the first number of bits is used to represent an integer part ofthe local scale value and the second number of bits is used to representa fractional part of the local scale value, wherein the adjustmentinformation further includes the first number of bits and the secondnumber of bits, and wherein performing the inverse dynamic rangeadjustment on the video data includes: generating the unadjustedcomponent values according to the local scale value for each of thepartitions as represented by the first number of bits and the secondnumber of bits.
 22. An apparatus configured to encode video, theapparatus comprising: a memory configured to store the video data; andone or more processors configured to: perform a dynamic range adjustmenton the video data to generate adjusted component values from the videodata, and generate at least one syntax structure in an encoded videobitstream, the at least one syntax structure indicating adjustmentinformation specifying how the dynamic range adjustment has been appliedto the video data, wherein the adjustment information includes: a tonemapping adjustment value that indicates color values can be trimmed to amaximum or a minimum value, and a number of partitions into which thevideo data was partitioned during the dynamic range adjustment, andwherein performing the dynamic range adjustment includes generating theadjusted component values according to the number of partitions.
 23. Theapparatus of claim 22, wherein the adjustment information furtherincludes a local offset value and a local scale value for each of thepartitions, and wherein performing the dynamic range adjustment on thevideo data includes: generating the adjusted component values accordingto the local offset value and the local scale value.
 24. The apparatusof claim 23, wherein the local offset value for each of the partitionsis represented by a first number of bits and a second number of bits,wherein the first number of bits is used to represent an integer part ofthe local offset value and the second number of bits is used torepresent a fractional part of the local offset value, wherein theadjustment information further includes the first number of bits and thesecond number of bits, and wherein performing the dynamic rangeadjustment on the video data includes: generating the adjusted componentvalues according to the local offset value for each of the partitions asrepresented by the first number of bits and the second number of bits.